CARACAS, Venezuela — Venezuela’s president and Supreme Court backed down Saturday from an unprecedented move to strip congress of its legislative powers that had sparked widespread charges that the South American country was no longer a democracy.

President Nicolas Maduro asked the Supreme Court in a late-night speech to review a ruling nullifying the branch of power that set off a storm of criticism from the opposition and foreign governments. The court on Saturday reinstated congress’ authority.

It was a rare instance of the embattled socialist president backing away from a move to increase his power. Opposition leaders dismissed the reversal as too little too late. They said the clarification issued by the judges only proved yet again that Maduro controls the courts and there is no longer a real separation of powers in Venezuela.

“The dire situation we’re living through in Venezuela remains the same. There is nothing to “clarify” when it comes to respecting the Constitution,” said former presidential candidate Henrique Capriles.

At the same time, critics celebrated the reversal as proof that cracks are showing in Maduro’s control of a country spiraling into chaos, with his approval ratings dipping below 20 percent amid the worsening economic and humanitarian crisis.

Opposition leaders recast a planned Saturday protest as an open air meeting. Hundreds of supporters joined congress members in a wealthy Caracas neighborhood to celebrate the rare victory.

Later, soldiers fired tear gas on activists who attempted to march on government offices downtown and blocked their path.

“This is the first time since the opposition won the National Assembly in 2015 that they have managed to get the president to reverse a decision. So this is huge,” said Javier Corrales, who teaches Latin American politics at Amherst College in Massachusetts.

Saturday’s revision undoes most of the original court decision, but will still allow Maduro to enter into joint oil ventures without congressional approval. Supreme Court president Maikel Moreno met with diplomats in the morning and warned that the court would not “remain passive” in the face of attacks on the country’s right to self-rule.

Maduro issued his instructions to the court after an emergency night meeting of the National Security Council Friday night that was boycotted by congress leaders. The three-hour meeting capped an extraordinary day in which Venezuela’s chief prosecutor and long-time loyalist of the socialist revolution launched by the late President Hugo Chavez broke with the administration and denounced the court ruling. Luisa Ortega said it was her “unavoidable historical duty” as the nation’s top judicial authority to decry what she called a “rupture” of the constitutional order.

That statement, and the internal division that it exposed, may have been the most damaging moment of the whole episode.

“It was really perhaps the first sign of public dissent within the ranks. And it was huge that Maduro did not trash her. Maduro must have realized that Ortega was not acting alone,” Corrales said.

As the country’s currency hemorrhaged value and analysts began to project the beginning of the end of 18 years of socialist rule in Venezuela, Maduro invited congress president Julio Borges to speak with him about the situation. Borges refused.

“In Venezuela the only dialogue possible is the vote,” Borges said Friday night.