Ecuador's top court has reinstated 57 lawmakers sacked last month for trying to block President Rafael Correa's call for a referendum on political reform.
The 57 lawmakers say they were unlawfully dismissed
The constitutional court's decision follows an appeal by the legislators against an electoral court ruling.
Mr Correa said the decision was "shameless" and did not say if he would accept it as valid.
Last week he won a landslide victory in the poll for an assembly to bypass Congress and write a new constitution.
Announcing the latest verdict, the head of Ecuador's top court, Santiago Velasquez, said the decision taken last month to sack the 57 congressmen and women was unconstitutional.
His court voted by a margin of 6-3 to reinstate the sacked congressmen.
But Mr Correa insisted that the lawmakers had been sacked for incompetence, and did not deserve their jobs back.
"They [court judges] struck a shameless deal with the 57 dismissed lawmakers," he said.
However, the BBC's South America correspondent, Daniel Schweimler, says it is by no means certain that the 57 will be able to resume their old jobs.
Mr Correa has been embroiled in a bitter conflict with the opposition Congress since taking power in January.
He has argued that Congress is corrupt and the cause of many of the country's problems.
Mr Correa's opponents fear he will use the assembly to try and weaken the power of the legislature.