BAMAKO, Mali - Soldiers arrested Mali's prime minister and forced him to resign before dawn Tuesday, showing that the military remains the real power in this troubled West African nation despite handing back authority to civilians after a March coup.

The ouster comes as the United Nations considers backing a military intervention in Mali, a once-stable country now in turmoil. By late Tuesday, a new prime minister had been named, but the developments drew international rebuke and raised questions on the viability of the military operation, which would use the country's military to try to take back Mali's north from Islamic extremists.

Prime Minister Cheikh Modibo Diarra, dressed in a dark suit, his forehead glistening with sweat, appeared on state TV at 4 a.m. to announce his resignation, hours after soldiers stormed his house.

"Men and women who are worried about the future of our nation are hoping for peace," he said. "It's for this reason that I, Cheikh Modibo Diarra, am resigning along with my entire government on this day. I apologize before the entire population of Mali."

Diarra, 60, is a NASA astrophysicist who has contributed to numerous space exploration missions. He is now under house arrest, said a spokesman for the junta, Bakary Mariko.

The government remains technically under the control of the interim president, Dioncounda Traore, who waited nearly 24 hours after Diarra's arrest to address the nation. Late Tuesday, he issued a decree naming a longtime civil servant, Django Sissoko, as prime minister.

On state TV, the coup leader, Capt. Amadou Haya Sanogo, accused Diarra of pursuing his personal ambitions. "We didn't force him," Sanogo said. "We facilitated [his resignation]."

The shake-up is already looking as if it may endanger plans for the military intervention. The African Union is proposing sending several thousand African troops to help the Malian military take back the north, which fell to al-Qaeda-linked Islamists in the chaos that followed the March 21 coup.

German Foreign Minister Guido Westerwelle warned that Diarra's ouster makes Western countries wary of getting involved in a military incursion.