A new Supreme Court has been sworn in in Ecuador, a day after Congress dismissed most of its members.
The judges left the court building after tear gas was fired
Some of the sacked judges refused to leave the courthouse at first, declaring the move unconstitutional.
But they abandoned their protest after police fired tear gas at an anti- government rally outside the building.
Ecuadorean President Lucio Gutierrez had sought an overhaul of the court, saying its judges were biased in favour of opposition parties.
The showdown began on Wednesday, when Ecuador's assembly voted to dismiss 27 of the court's 31 judges.
Its Chief Justice, Hugo Quintana, immediately denounced the move as "illegal" and said he would only be removed from his office by force.
Police took up positions around court buildings in Quito, Ecuador's capital, and around 200 pro-court protesters gathered nearby.
The magistrates left the building when tear gas was fired.
Mr Quintana later said he and other sacked judges would continue to work as a "Supreme Court in exile".
President Gutierrez, a former army chief who won power in 2002, said the court was loyal to the opposition, which recently tried to launch impeachment proceedings against him.
Supporters of the court say the dismissal was dictatorial
Mr Gutierrez announced new judges drawn from political parties that opposed the impeachment drive.
The new court will be a temporary arrangement until a constitutional amendment is proposed next year, he said.
The opposition says the constitution does not allow for the quick removal of the judges.
But political analyst Fernando Bustamante says that although it was unconstitutional, the decision should be good for political stability.
He says the court has been under the effective control of former President Leon Febres Cordero for years, and that for Mr Gutierrez to be able to govern he had to reduce the powers of Mr Febres Cordero.