Madagascar's army has retaken control of an army barracks where soldiers staged a mutiny, the military says.
There were outbreaks of gunfire throughout the day at the base near the airport in Antananarivo, and officials said three people were killed.
Flights to and from the airport were suspended while the gun battles raged.
Madagascar has a recent history of army rebellions; President Andry Rajoelina came to power after leading often violent protests backed by soldiers.
The army confirmed that a mutiny had taken place in the early hours of Sunday.
Witnesses reported sporadic bursts of gunfire for about four hours, and dozens of locals gathered near the base to see what was happening.
Police and soldiers surrounded the area and evacuated some buildings.
Officers were sent to negotiate with the rebellious troops, but officials said at least one of the negotiators was shot and killed.
The military said it launched an operation to retake the base after negotiations failed.
In the subsequent gunbattle, the leader of the mutiny and another soldier were killed.
"Mopping up operations are continuing," said army spokesman Rarasoa Ralailomady.
"A night operation has not been ruled out but the situation is under control."
No reason was given for the mutiny, and its aims remain unclear.
The army plays a major role in Madagascar's society, frequently meddling in politics.
It backed Mr Rajoelina's 2009 seizure of power from Marc Ravalomanana.
In 2002, the army had also helped Mr Ravalomanana to seize power in similar fashion when he led street protests against the previous Marxist administration.