CNNMexico has more on the chaos in Ecuador
(CNN) -- The chief of the national police in Ecuador, Freddy Martinez, said Friday that he was resigning effectively immediately.
His departure comes a day after a chaotic uprising by police officers left President Rafael Correa trapped for several hours in a hospital. Troops loyal to the president arrived at the hospital and rescued him Thursday evening; two police officers were killed.
The police officers said they were angered by a new law that would take away their bonuses and reduce their compensation. The president, who was roughed up and hit by tear gas, said the law would do no such thing and said the police officers had not even read it.
Hours after the rescue, Correa repeated his claim that compensation issues were merely a pretext for police to kidnap him and try to overthrow his government.
"It was an attempt and a perfectly coordinated conspiracy," he said late Thursday.
On Friday, a group of South American leaders condemned the disturbance as an "attempted coup" and praised troops for rescuing the country's president in a shootout with police.
In a statement issued after an emergency meeting in Argentina, the group of presidents and top officials pledged to send their foreign ministers to Ecuador later Friday to show support for Correa.
Two people died in clashes between police and the military after hundreds of troops arrived at a hospital outside the country's capital to rescue Correa on Thursday night, Ecuador's Red Cross reported. At least 88 people were injured in unrest throughout the country.
The violent standoff between police and troops lasted for nearly an hour, said Freddy Paredes, a reporter for CNN affiliate Teleamazonas who watched the shootout from a hospital room.
Correa, wearing a military helmet and a gas mask, escaped in a wheelchair as gunfire rang out, he said.
"The police are very fearful, because the president has announced that there will be no forgiveness nor forgetting for the police that were insubordinate," Paredes said
Correa said late Thursday that those responsible would be held accountable.
"It has been a very sad day. I send a warm embrace to those who were injured. I pray to God that nobody dies. Because of what happened, we now need to purge our National Police," he said.
The disturbances occurred as Correa threatened to dissolve the National Assembly over a dispute about several laws, including public service and education.
Violence erupted early Thursday when police officers took to the streets, claiming a new law would take away their bonuses and reduce their compensation.
Government officials tried to quell the rebellion, insisting that the security forces had been misinformed and warning that the nation's democracy was in danger.
When the president tried to negotiate with them, the protest turned violent. A tear gas grenade was thrown, and Correa was led away, holding a gas mask to his face.
Correa, who is recovering from knee surgery, said angry police tried to suffocate him.
"They made me bend my knee to the point that I could not walk," he said Thursday night.
He stressed that a law passed Wednesday by the National Assembly did not cut compensation bonuses of police, as some had asserted, and he accused his political opponents of misinforming and manipulating the public about the legislation.
Thursday night, he said that police -- "not one of them" -- had read the law.
"When they demanded that I revoke the law to let me out, I told them, 'Don't waste time with me. I leave as president of a dignified nation, or I leave as a cadaver,'" he said, his voice hoarse from shouting into a microphone
"Of course, the law will not be revoked," he added, stabbing his finger into the air.
Speaking to a jubilant crowd outside the presidential palace, Correa said former president Lucio Gutierrez and other political opponents were behind the day's unrest -- which he repeatedly called an attempted coup.
But in an interview earlier Thursday with CNN en Espanol, Gutierrez sharply denied that claim.
Angry police said Thursday that they were overworked and underpaid.
"We work 14 hours a day," a uniformed officer said on Ecuador TV. "We are the ones who never protest."
Both of the men killed in Thursday night's clashes were police officers, the Red Cross said.
Correa thanked his supporters -- in particular his bodyguards -- for standing behind him and said the rebel police effort to oust him had failed.
"Nobody has supported the police as much as this government, nobody has increased their salaries as much," he said. "After all we've done for the police, they did this!"
Correa said the actions of the police left him "profoundly sad, like there was a knife in my back."
The government declared a one-week state of emergency Thursday afternoon and put the military in charge of security. The military said it will support the president and the nation's democratic institutions.
When the Union of South American Nations convened an emergency meeting in Buenos Aires, Argentina, to discuss the situation, the presidents of many South American nations -- including Venezuela's Hugo Chavez, Bolivia's Evo Morales and Colombia's Juan Manuel Santos -- were in attendance.
After the meeting, Chavez accused the United States of being behind the unrest in Ecuador.
"The Yankee extreme right is trying right now, through arms and violence, to retake control of the continent," Chavez said.
Earlier Thursday U.S. Secretary of State Hillary Clinton issued a statement expressing support for Correa.
"The United States deplores violence and lawlessness, and we express our full support for President Rafael Correa, and the institutions of democratic government in that country," she said.
Correa was elected president in 2006 and took office in 2007. The socialist president earned a doctorate in economics from the University of Illinois at Urbana-Champaign in 2001.
CNN's Catherine E. Shoichet and Rafael Romo in Atlanta, Georgia, and journalist Martha Sandoval in Quito, Ecuador, contributed to this report.