By Christina Corbett
BBC News, Antananarivo
Opposition leader Andry Rajoelina cannot count on universal support
In the end, President Marc Ravalomanana had few other options.
As opposition leader Andry Rajoelina addressed the press and supporters in presidential offices in central Antananarivo, news spread that Mr Ravalomanana would stand down and hand over to a military leadership.
Throughout the morning, ministers in Mr Ravalomanana's government had been resigning. With no military support, and with his rival occupying the red-bricked Ambohitsorohitra Palace in the city centre, Mr Ravalomanana has bowed to the inevitable.
But public demonstrations alone did not bring the president down. It was only when the army, claiming to remain neutral but already distanced from Mr Ravalomanana, moved to support the opposition that the balance shifted decisively in Mr Rajoelina's favour.
"President, president," chanted his supporters as he stood to say his first words as head of his newly installed, self-proclaimed Transitional High Authority.
Show of force
Spiritual leaders were on hand. Dressed in white, they had already performed a traditional ceremony to banish evil spirits from the building - digging up the tarmac outside and burning idols while soldiers bristling with weapons looked on.
Several armoured vehicles guarded the gates, and heavily armed troops patrolled the surrounding roads. Usually busy, today they were closed and only a few hopeful street traders tried to sell their fresh fruit and flowers.
Soldiers have taken over presidential offices
Just a stone's throw away in this hill-top district of the city are the Central Bank and the Ministry of Finance.
It was a clear show of military force when armoured vehicles crashed through the perimeter defences of the Ambohitsorohitra Palace office complex on Monday night.
Flares lit the night sky above Madagascar's capital city, and a volley of gunfire marked the opposition's entry into the manicured grounds of one of Antananarivo's most beautiful buildings.
The military have proved pivotal in this bitter political dispute.
After emerging from over a week in hiding on Saturday, the opposition leader has made every attempt to capitalise on renewed momentum in his movement.
Rallies have been held every day in the city centre, and Mr Rajoelina's own prime minister has been installed in the official prime ministerial complex.
But these recent advances have not been made on the back of a ground swell of public support.
Crowds at opposition demonstrations typically number two to three thousand, in a city with a population of nearly two million, and a country with a population of 20 million.
Support for Mr Rajoelina in the provinces is far from guaranteed.
Instead, the emphasis has been on Mr Rajoelina's claims that he is in command of the army.
The message from his camp has been clear - military force lies with Mr Rajoelina.
And today Mr Ravalomanana has been forced to acknowledge that without a full cabinet of ministers and without sufficient military support, he can no longer remain president.
Confusion remains over who will take over from Mr Ravalomanana. The indications are that the military directorate named by the former president has crumbled.
This leaves people here wondering who is now in control of this Indian Ocean island.