Venezuela’s Supreme Court on Saturday revoked its widely criticized ruling to take over the National Assembly’s legislative powers. The court announced it is handing back the powers after government leaders earlier Saturday had urged a review of its decision from earlier this week. On Wednesday, the court ruled that all powers vested under the legislative body would be transferred to the court, which is stacked with government loyalists. The opposition called the move a coup. Venezuelan Attorney General Luisa Ortega Diaz also decried the ruling this week. But Saturday the court said it has removed certain parts of the judgment that took over the legislative powers. President Nicolas Maduro, flanked by other top officials, appeared on national television early Saturday, addressing the controversy ahead of more streets protests. “We’ve reached an important agreement to solve this controversy,” said Maduro, who didn’t elaborate. Vice President Tareck El Aissami read a six-point communique that included the request for the court to re-examine its finding. Protests The court’s argument behind its initial ruling was that the National Assembly was in contempt of law for ignoring an order preventing the swearing-in of three legislators from Amazonas state whose elections the court had deemed invalid. The court’s move meant the three branches of the Venezuelan government would be controlled by the ruling United Socialist Party. Protests erupted on the street and in the halls of government. National Assembly President Julio Borges called the court decision a coup staged by Maduro. The ruling spurred anti-government protests on Friday and clashes between demonstrators and the National Guard outside the Supreme Court building. Ortega, long perceived as a Maduro loyalist, said the decision “constitutes a rupture of the constitutional order. Venezuelans suffer from chronic food and medical shortages. The country is plagued by an economic crisis caused by massive government overspending and corruption, mismanaged resources and low oil prices.