Renegade Philippine troops have agreed to end their mutiny in Manila and return to barracks, the government says.
Rebel leaders agreed to give up after hours of negotiations
President Gloria Arroyo went on television to announce that "the crisis in Makati is over - 296 soldiers, including 70 officers, are standing down and returning to barracks".
The rebel soldiers had stormed a prestigious shopping complex in Manila early on Sunday, demanding the resignation of Mrs Arroyo, whom they accused of corruption.
The breakthrough came after several hours of negotiations between the rebels and senior government officials. Not a shot was fired.
The rebels filed out of the Glorietta complex, in the Makati financial district, carrying weapons and boxes of ammunition, to be driven back to barracks after the 19-hour stand-off.
Explosives set by the rebels were dismantled. Reporters saw anti-tank weapons, machine guns and a rocket launcher being removed from the building.
'No special treatment'
Many of the rebels looked grim but some punched the air in defiance.
One truckload broke into a chorus of "I've been working on the
Mrs Arroyo said the rebels had "not asked for, and shall not be given, special
She said civilians involved in any plot linked to the mutiny would be prosecuted.
Five officers - captains and lieutenants, regarded as ringleaders - would "face the full consequence of what they have done," she said.
Navy Lieutenant Antonio Trillanes, one of the rebel leaders, said the soldiers had been "ready to die" but ended their actions to prevent needless bloodshed.
He doubted military officials' claims that further talks would be held with the rebels. "I am convinced these reforms will not pass in my lifetime," he said.
The BBC's John McLean in Manila says the rebels had clearly given up under threat of force and that at no stage did the government seem in danger of being overthrown.
The rebels had demanded the resignation of Mrs Arroyo and her defence minister, Angelo Reyes.
They accused the government of staging terrorist attacks in the Philippines as a means of getting military aid from the US.
'State of rebellion'
Hundreds of troops loyal to Mrs Arroyo surrounded the shopping complex.
The president declared a nationwide "state of rebellion" and told the soldiers they had until 1700 (0900 GMT) to surrender or face an all-out assault - although that deadline was subsequently pushed back two hours.
About 15 of the mutineers surrendered early but the remainder held out.
In an earlier televised address, Mrs Arroyo warned the rebels that her troops would use "reasonable force" to retake the complex and insisted that she remained in full control of affairs.
Telling the mutineers that she was their "commander-in-chief", she said: "You have crossed the line of professionalism and are now engaged in unlawful political action backed by the use of force."
The US State Department expressed its "full support" for Mrs Arroyo - a position echoed by Australia's foreign minister.
"We don't want to see presidents fall out of the barrel of a gun," Alexander Downer said.
Australia's ambassador to the Philippines and other foreign nationals had managed to leave the compound early on Sunday after being trapped by the incident.
Correspondents at the scene said the situation was complicated, with evidence of mutineers exchanging handshakes with the troops sent to surround them.
One rebel who left the complex saluted a general who was there to accept his surrender and the general embraced him.