The Venezuelan supreme court has reversed its ruling to strip congress of its legislative powers.
It made the decision after the government of President Nicolas Maduro urged it to review the ruling “to maintain institutional stability”.
The initial decision – announced on Wednesday – had been denounced as a “coup” by the opposition, which dominates the National Assembly.
Anti-government protesters have staged daily protests against the move.
The supreme court announced the reversal on its website.
A day earlier, chief prosecutor Luisa Ortega, an ally of President Nicolas Maduro, became the first high-ranking official to criticise the judges.
Speaking live on TV, she expressed “great concern” about a measure which, she said, violated the constitution.
Promising dialogue to end the crisis, Mr Maduro had convened a late-night meeting of the state security council.
Afterwards Vice-President Tareck El Aissami said: “We urge the supreme court to review the decisions… in order to maintain institutional stability and the balance of powers.”
Mr Maduro said: “This controversy has been overcome, showing the power of dialogue.”
How did the dispute start?
In its original ruling, the supreme court had annulled the powers of the assembly, allowing the judges to write laws.
The court had accused lawmakers of “contempt” after allegations of irregularities by three opposition lawmakers during the 2015 elections.
The court has backed the leftist president in his ongoing struggles with the legislature. On Tuesday it removed parliamentary immunity from the assembly’s members.
There has been widespread international condemnation, with the Organisation of American States talking of the “final blow to democracy” in Venezuela.
Why is Venezuela in crisis?
Tensions have been high because the country has been engulfed in a severe economic crisis.
It has the world’s highest inflation rate, which the International Monetary Fund predicts could reach 1,660% next year. Long queues, power cuts and shortages of basic goods are common.
The government and opposition blame each other for the country’s problems, made worse by the falling price of oil, Venezuela’s main export product.
President Maduro has become increasingly unpopular and the opposition has called for his removal