(BBC)Soldiers opened fire on police to rescue President Correa
Ecuador's President Rafael Correa has said there will be "no pardon or forgiveness" for those involved in an uprising against him.
Mr Correa had to be rescued by the army from a hospital in the capital, Quito, after he was trapped there for several hours by disaffected police.
The president was being treated after inhaling tear gas fired by police who were protesting at austerity measures.
Two people died and dozens were injured in the unrest, officials said.
The president and his supporters said the police revolt over a new law cutting benefits for public servants amounted to an attempted coup.
A state of emergency has been declared.
Mr Correa said there were be "a deep cleansing of the national police", and that he would "not forgive nor forget" what had happened.
The commander of Ecuador's police force has since resigned, a police spokesman said on Friday.
South American heads of state held an emergency meeting in Argentina and called for those behind the revolt to be tried and punished.
The sight of two key state institutions, the national police force and the military, exchanging gunfire will be one which worries many ordinary Ecuadorians, and reminds them of the past.
Ecuador's history is peppered with violent street uprisings which often ended with the removal of the head of state. In this instance, there was to be no such outcome, but it was a sign of how polarised life in Ecuador has become in recent years, with Mr Correa dividing opinion across the country.
The initial reason for the protests -austerity measures - was almost lost among the high drama of the presidential siege. But that, and other issues such as an impending decision on whether to dissolve parliament and call an early general election, are facing Mr Correa when he recovers from what was, without doubt, his toughest day since taking office.
Mr Correa, a 47-year-old US-trained economist, took power in 2007 and was elected for a second term in 2009, despite a decision to default on $3.2bn of global bonds, which caused widespread fiscal problems for the government