Ecuador's controversial leader Lucio Gutierrez has been placed under arrest after Congress ousted him, the armed forces withdrew their support and a new president was named.
The embattled Gutierrez left the Carondelet presidential palace just as the legislature named Vice-President Alfredo Palacio as the new head of state.
He travelled by helicopter to Quito's airport, where protesters prevented him from leaving the country, reportedly to Panama, where his wife and two daughters are.
The helicopter then took Gutierrez to a nearby military base, where he was being held. Prosecutor Cecilia de Armas said she ordered his arrest for ordering police and soldiers to crush protesters demanding his removal from office.
Gutierrez, who won a presidential election runoff in 2002, is a retired colonel, best known for being one of the leaders of a coup to oust elected president Jamil Mahuad in 2000.
He becomes the third president to be ousted since 1997. That year, Congress removed then-president Abdala Bucaram on grounds of mental incapacity.
"Today, the arrogance and fear have ended," said Palacio, a left-wing, 65-year-old cardiologist who had been elected alongside Gutierrez.
Ecuador has been beset by
political crises since 1997
The government earlier rejected a congressional vote to oust Gutierrez, but the military then withdrew its support for the president, who had already been weakened by street protests that killed at least two people and wounded 100.
Sixty of the 62 lawmakers present at the session voted to oust Gutierrez, said Christian Democrat Deputy Ramiro Rivera.
Under Ecuador's constitution, the president can be dismissed for dereliction of duty.
Earlier, the chief of police resigned. "I cannot continue serving as a witness of confrontations between the people of Ecuador," police General Jorge Poveda said.
Gutierrez had said earlier he would not step down and insisted the protests were financed by business tycoons.
The political turmoil began in December after Gutierrez asked the legislature to dismiss 27 of 31 Supreme Court justices, a move seen by opponents as an attempt to consolidate power.
Discontent spread rapidly over the new Supreme Court decisions not to put on trial former presidents Bucaram, who ruled Ecuador from 1996 to 1997, and Gustavo Noboa, president from 2000 to 2003.
In April, the court allowed the two leaders, both allies of Gutierrez, to return to Ecuador from their exile in Panama and the Dominican Republic.