Madagascar's president handed over power Tuesday — but not to the rival who plunged this Indian Ocean island nation into weeks of turmoil with his bid for power.

In a radio address Tuesday, President Marc Ravalomanana said he was ceding power to the military.

"After deep reflection, I have decided to dissolve the government and give up power so that a military directorate can be established," he said. "This decision was very difficult and very hard, but it had to be made. We need calm and peace to develop our country."

An aide to Ravalomanana said the military directorate would be made up of veteran, high-ranking military leaders who would organize a national conference that would be responsible for holding elections within two years. Ravalomanana's term would have ended in 2011.

The members of the directorate were not named.

There was no immediate reaction from opposition leader Andry Rajoelina, who has led weeks of anti-government protests.

Rajoelina accuses Ravalomanana of misspending public funds and undermining democracy in Madagascar — an impoverished Indian Ocean island of the coast of Africa known both for its natural beauty and its history of political infighting and instability.

Over the weekend, Rajoelina declared himself president of a transitional government and promised new presidential elections within two years. On Monday, he called on the army to arrest the president, but soldiers refused.

The president says Rajoelina is seeking power by unconstitutional means. A breakaway army faction had claimed it was neutral and interested only in restoring order, but the split in the military has greatly weakened the president.

Earlier Tuesday, Rajoelina entered one of the capital's presidential palaces, welcomed by mutinous soldiers who apparently support him. That could set the stage for further impasse. The soldiers had seized the deserted palace, usually used for ceremonial purposes, on Monday night.

The president was in his official residence, surrounded by supporters and army guards.

In addition to soldiers, Rajoelina had been greeted by mpiandry, traditional healers who specialize in exorcism. The palace had been the site of a deadly clash between anti-government supporters and troops last month.

Edmond Razafimanantena, a newsstand owner in the capital, said he didn't want the president, his rival or the military in charge.

"You can't expect anything from these politicians, the opposition is as bad as the government. And you can't accept mutinous soldiers running the country," he said.

Tensions have been rising since late January, when the government blocked an opposition radio station's signal. Rajoelina supporters set fire to a building in the government broadcasting complex as well as an oil depot, a shopping mall and a private TV station linked to Ravalomanana. Scores of people were killed.

Days later, soldiers opened fire on anti-government protesters, killing at least 25. The incident — at the same palace seized Monday — cost Ravalomanana much of the support of the military, which blamed him for the order to fire at demonstrators.

Angele Ramaromihanta, a secretary living in the capital, said a peaceful solution must be found.

"I don't understand why the politicians don't want to talk," she said Tuesday. "I'm afraid of the army seizing power — donors won't want to help us."