The Ecuadorean president, Rafael Correa, has vowed to punish protesters who rebelled against his leadership, saying there would be "no forgiving nor forgetting" for those who plunged the country into anarchy.
Addressing cheering crowds from the balcony of the Carondelet Palace after being rescued from a besieged hospital in the capital, Correa said the uprising was not a simple police insurrection over pay-related grievances but an attempt to overthrow him.
"Those people made the institution look so bad that they attacked their co-citizens, that they abused the weapons given to them by the society to which they belong, that they dishonoured the police uniform. Of course, all the people who can be identified will have the corresponding sanction. There will be no forgiving nor forgetting."
Earlier today soldiers stormed the hospital with automatic gunfire and stun grenades in a battle which left at least two dead and dozens injured, and enabled Correa's swift and triumphant return to the presidential palace.
Emotional and euphoric, Correa told supporters he would make an example of those responsible.
"What loyalty, what support," he shouted to loud applause. "This will serve as an example for those who want to stop the revolution not through the ballot box but with weapons."
The rescue was the climax to a dramatic day in which a police revolt over austerity measures spiralled out of control, leaving airports and motorways blocked, borders sealed, the president assaulted and businesses looted.
The Ecuadorean police chief, Freddy Martinez, resigned this afternoon after failing to stop the rebellion, a spokesman for the force told Reuters.
The protests were triggered by a law passed by Congress on Wednesday that would end the practice of giving medals and bonuses with each promotion, part of Correa's effort to save costs and slim bureaucracy.
Ecuador is one of South America's most volatile countries, with a tradition of protests, but nobody expected to see scores of uniformed men overrunning the main airport of the capital, Quito, forcing its closure and the declaration of a state of emergency.
It was just the beginning. Hundreds of rank and file soldiers and police took over barracks in Quito, Guayaquil and other cities. They also set up roadblocks of burning tyres and occupied Congress, shouting "respect our rights!" and "long civil war!".
Smoke wafted over Quito and sporadic looting left several banks and supermarkets ransacked. A state TV channel showed police trying to enter its studio. The channel said the police shattered windows and tried to cut the power supply.
Correa, a 47-year-old economist with a firebrand style, went to a regimental barracks to try to negotiate with protesters but was surrounded, punched, doused with hot water and almost blinded with teargas.
A government helicopter tried to evacuate him but was unable to land. The president was spirited to a hospital but police rebels laid siege.
"This is a coup attempt," Correa told state-run TV. "They're trying to get into my room, maybe to attack me. I don't know. But, forget it. I won't relent. They are a bunch of ungrateful bandits. No one has supported the police as much as this government."
Civilian crowds loyal to the president confronted police, prompting Correa to address the throng from his hospital window: "If they want me, here I am," he shouted and ripped his tie loose. "I leave here as president or they take me out as a corpse."
The foreign minister, Ricardo Patino, led another pro-government crowd to the Carondelet Palace, the president's home.
Latin American leaders from across the political spectrum united in support of Correa, as did the US and the UN secretary general, Ban Ki-moon. Colombia and Peru sealed their borders in solidarity with the embattled president. The Opec nation's turmoil pushed global oil prices to nearly $80 (£50) a barrel.
Loyalist army units broke the siege in a 35-minute gun battle that left at least two police dead, according to the Red Cross. One report said the president was smuggled out of the hospital in a wheelchair under cover of darkness as gunfire blazed. A four-wheel-drive vehicle rushed him to the palace. At least 74 people were reported injured during the day's clashes.
Venezuela's president, Hugo Chávez, backed his ally's contention that the unrest was a coup attempt. Doris Solis, an Ecuadorean cabinet minister, disagreed. "This is not a coup," she told CNN.
The head of the armed forces, Ernesto Gonzalez, said troops remained loyal to Correa. "We are in a state of law. We are loyal to the maximum authority, which is the president."
Even before the protests, the government's proposed austerity measures had triggered a political crisis and revolt by the president's own party, the Country Alliance. Correa threatened to dissolve parliament and rule by decree until elections.
Correa, who has a Belgian wife, was elected in 2006 promising a "citizens' revolution" to spread the benefits of oil, gas and other revenues to the poor in the Andean mountains, Amazon forests and Pacific coast slums. He defaulted on a $2.8bn debt, calling it illegitimate, and boosted spending on education and health.
He was re-elected under the new constitution last year but since then public sector workers and indigenous groups, among others, have accused him of breaking promises.
Members don't see ads. If you are a member, and you're seeing this appeal, click here
|Riot Police Confront Mourners of Slain Baltimore Rapper Lor Scoota|
|The Corbyn No-Confidence Vote and the Bleeding of the Labour Party|
|Clinton Appointees to DNC Platform Didn't Support Positions Clinton Claims To Hold|
|Brexit sends Europe into Political and Economic Crises|
|Clinton Forces Dominate DNC Platform, Demolishing Key Sanders Issues|
|Supreme Court Strikes Down Texas's Repressive Anti-Abortion Bill|
|Imagine a Decentralized Movement, Independent of the DNC, with a Hundred Times the Fundraising and Volunteer Power - People for Bernie Co-Founder|
|The Laura Flanders Show: Beyond Bernie: Socialism and the Struggle Against Capitalism|
|Lapavitsas: The Left Needs to Develop an Alternative Plan for Europe|
|Extreme Heatwaves, More Wildfires, and Dying Trees|
|Nina Turner: The Oligarchy Must Be Challenged by Everyday People|
|Sanders Delegate: People Understand that the System Is Rigged in Favor of the Billionaire Class|
|The Empire Files: Untold History of Imperial Japan & the Bomb|
|Rep. Tulsi Gabbard: I Remain Concerned about Clinton's Interventionist Foreign Policy|
|How Western Military Interventions Shaped the Brexit Vote|
|Sanders Delegate: Climate Change and the Israeli Occupation Must be Raised at the Convention|
|Activist: You Won't Find Justice in an Unjust System|
|Sanders Delegate - If No Significant Concessions at Dem. Convention, Then There Will be Civil Disobedience Inside and Out|
|Britain Votes to Leave the European Union|
|Where's the Anti-War Movement in the 'Political Revolution'?|
|Would the Cops Be Convicted if #FreddieGray was White?|
|Historic Ceasefire Agreement Signed in Colombia|
|Outrage after Officer Accused of Murder in Freddie Gray Case Found Not Guilty of All Charges|
|To End War in Syria, Adopt "First, Do No Harm" Diplomacy|
|Police Accountability Suffers Major Blow with Goodson Acquittal|
|Gun Control Sit-In Political Theater Can Be Used to Our Advantage|
|Commentary: Oaxaca Teachers Strike Is About Defending The Revolutionary Educational Tradition|
|The Empire Files: Puerto Rico's Debt to its Oppressors|
|Can the EU be Reformed from Within?|
|Green Party Candidate Margaret Flowers on Healthcare, Climate Change, and Community Economics|