Presidential guards and hundreds of supporters have come out to protect Marc Ravalomanana, the president, after troops seized his offices in the capital Antananarivo.
Ravalomanana, who was sheltering in a presidential palace outside the capital on Tuesday, has vowed to fight to the death if pro-opposition soldiers try to remove him from power.
Supporters formed a human shield outside the compund about 6km from the city centre.
The Malagasy army is split between these who are loyal to the president and these who support Andry Rajoelina, the opposition leader.
Al Jazeera's Haru Mutasa, reporting from the capital Antananarivo, said the proportions of the two factions were unknown.
"The key question is whether the opposition leader will manage to get the soldiers behind him to go and take the president's residence.
"We know there are soldier inside the president's compound protecting him but we don't know how many they are," she said.
Rajoelina, who had previously declared himself the de facto leader of the Indian Ocean island nation, prepared to gather his supporters for a rally in the centre of Antananarivo on Tuesday.
"It's then thought he will tell his supporters to follow him on foot towards the administrative offices where he will open the door and walk in, as a a symbolic show that he has taken over," Al Jazeera's Haru Mutusa said.
"He [Rajoelina] has said he doesn't want to see any bloodshed and the army troops supporting him has also said they don't want anyone to get killed. As far as the president is concerned, they want him to leave peacefully, they don't want to kill him.
On Monday, troops loyal to the opposition leader stormed the palace where the president's administrative offices are located, and seized the central bank.
Tanks and scores of soldiers guarded the buildings on Tuesday.
The African Union has condemned the "attempted coup d'etat" in Madagascar. The European Union has said it will cut aid and shun anyone coming to power by force.
Rajoelina accuses 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 offered on Monday 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.