Mamy Ranaivoniarivo is the second defence minister to resign this year
Madagascar's defence minister has resigned after being confronted by a group of soldiers in his office.
On Sunday, a section of the army announced they would no longer obey the government and would instead follow opposition leader Andry Rajoelina.
Mr Rajoelina is understood to have taken refuge at the French embassy in the capital Antananarivo.
Hundreds of government supporters gathered outside the building, demanding that he be handed over.
The AFP news agency reports they have since been dispersed by security forces.
Meanwhile, President Marc Ravalomanana has made a national appeal for an end to the violence, while admitting that he has made mistakes during the crisis, which has left about 100 people dead.
"I wish to reiterate, stop the acts of violence. When the constitution and the republic are not respected, then the democracy and the establishment of a successful nation will be hindered," he said live on national TV.
The president and Mr Rajoelina, a 34-year-old former DJ, have been involved in a fierce power struggle for several weeks.
The BBC's Louvassou Rabari in Madagascar says looting is continuing for a second day in Antananarivo.
Vice-Admiral Mamy Ranaivoniarivo read out his resignation letter flanked by a group of soldiers.
He later suggested to Reuters news agency that he had been forced out.
Security forces last week tried to arrest Andry Rajoelina
"Perhaps I resigned under threat. I do not like it that Malagasy people are killing each other," he said.
He only became defence minister a month ago, after his predecessor resigned.
Cecile Manorohanta stepped down in February after security forces opened fire on an opposition protest.
Security forces last week tried to arrest Mr Rajoelina after he walked out on direct talks with Mr Ravalomanana, accusing his rival of dismissing opposition grievances and pledging to revert to mass street action.
The opposition leader, who was sacked as the capital's mayor last month, has accused the president of being a dictator and declared himself president, announcing his own administration.
President Ravalomanana denies abusing power and says he will remain in power until the end of his mandate in 2011.