Soldiers have rescued Ecuador's president in a hail of gunfire from the hospital where he had been trapped by striking police officers for more than 12 hours.
President Rafael Correa appeared on the balcony of the presidential palace in the capital Quito shortly afterwards and addressed an adoring crowd.
He had been trapped in the hospital where he was treated after being tear-gassed on Thursday in a confrontation with hundreds of police angry over a law that would slash their benefits.
Mr Correa appeared to have been removed in a vehicle by the soldiers.
Earlier, hundreds of police furious over a law that will slash their benefits plunged the country into chaos, tear-gassing Mr Correa, shutting down airports and blocking roads in a nationwide strike.
At least one person was killed and six injured in clashes between police and supporters of the president outside a police hospital where the leader was being treated, the security minister said.
The government declared a state of siege, putting the military in charge of public order, suspending civil liberties and allowing soldiers to carry out searches without a warrant.
Incensed police shoved Mr Correa around, pelted him with water and doused him in tear gas when he tried to speak to the rebellious officers. The 47-year-old leader was taken to the hospital after being nearly suffocated by the gas.
Hours after Mr Correa was manhandled and surrounded by dozens of rebel police outside the hospital, the president declared himself "practically captive". He said he was negotiating with the police but vowed to leave either "as president or as a corpse".
The defiant officers took over police barracks in the capital Quito, Guayaquil and other cities. Some set up roadblocks of burning tyres.