Hyppolite Ramaroson, a navy admiral and the most senior military official, was to lead the country as part of a directorate made up of high-ranking military officers,  presidential aides said. 

Ramaroson, along with other military leaders, was expected to comment on the situation later on Tuesday.

The Madagascan military is split between these who are loyal to the president and those who support Andry Rajoelina, the opposition leader.

'Transitional authority'

After the transfer of power, the opposition said that Rajoelina would lead a "transitional authority" and would organise presidential and general elections in the next 24 months.

It was not immediately clear how the military leadership would react to the opposition's announcement.  

In depth

 Timeline: Madagascar crisis
 Profile: Marc Ravalomanana
 Profile: Andry Rajoelina 

"We aren't sure about how many soldiers still support the president, we know that there is still a large presidential guard in the palace," Al Jazeera's Haru Mutasa, reporting from Antananarivo, said.

"There are also stories going around in the local media here that there are foreign troops or mercenaries in the compound.

"If the military isn't united that could bring a lot of problems in the future."

Colonel Andre Ndriarijaona, who became army chief after his predecessor was ousted by mutinous troops, has thrown his weight behind Rajoelina, rather than Ramaroson.

"I prefer Andry Rajoelina because if we go with the vice-admiral we will throw ourselves into another crisis," he said.

Fanja Saholiarisoa, a journalist in Antananarivo, said there was likely to be a dispute within the military.

"There is an extraordinary meeting planned to discuss that," she said.

Coup warning

Jean Ping, the African Union commission chairman, warned Madagascar's military that it should not hand over power to Rajoelina.

"If the military hand over power to the mayor, it is not constitutional," he said. "We do not know exactly what is going on."

Rajoelina led supporters to the presidential offices in Antananarivo on Tuesday [Reuters] 
He said that any taking of power by non-constitutional means would be considered a coup d'etat by the body.

Rajoelina, who had previously declared himself the de facto leader of the Indian Ocean island nation, on Tuesday led his supporters to the presidential palace captured the previous day.

Tanks and scores of soldiers loyal to the opposition leader guarded the palace and the central bank on Tuesday.

The president's spokesman said that Ravalomanana, who had been sheltering at another presidential palace about 6km outside the capital, was being moved to an undisclosed location.

Robert Wood, a US state department spokesman, dismissed reports circulating in Madagascar that Ravalomanana had taken refuge in the US embassy in Antananarivo.

Rajoelina has accused Ravalomanana of being a dictator and misusing public funds. In turn, Ravalomanana's supporters call Rajoelina a troublemaker bent on seizing power illegally.

Under growing pressure to resign, Ravalomanana had offered to hold a referendum to let the people decide who should run Madagascar. But Rajoelina rejected the offer, saying the people had already made their opinions clear.

At least 135 people have been killed since the country's political crisis began in January, most of them when security forces cracked down on anti-government protests at the order of Ravalomanana's government.