The party of El Salvador's President Nayib Bukele has voted to remove the country's top prosecutor, part of an intensifying political drama that has rocked the Central American country and drawn international criticism.
The vote shortly after midnight to dismiss Attorney-General Raul Melara followed a new legislative majority's votes on Saturday night to kick out the judges on the constitutional chamber of the nation's supreme court.
The vote provoked rebukes from opposition lawmakers as well as some international rights organisations.
After a call with Bukele later on Sunday, US Secretary of State Antony Blinken expressed his "grave concern" over the ouster of the judges and prosecutor in a statement.
Ruling party lawmakers accused Melara, whose office wields significant power to conduct investigations, of lacking independence, while Blinken cited what he described as the chief prosecutor's effective track record of fighting corruption and impunity.
US President Joe Biden has cited corruption in El Salvador, Guatemala and Honduras as one of the root causes, along with gang violence and poverty, of the increased flow of migrants to the US-Mexico border.
It is pressing those governments to do more to fight crime.
A savvy and constant user of social media, the popular Bukele stressed his desire to work with all sides but insisted the dismissals were warranted in a string of Twitter posts.
"With all due respect, we're cleaning our house and this isn't your responsibility," the 39-year-old president wrote, specifically addressing "the international community".
Some 200 protesters, nearly all of them masked, gathered around San Salvador's constitution monument on Sunday, peacefully chanting anti-Bukele slogans and expressing frustration with the sudden sackings.
"We need to show that a huge part of the population doesn't agree with this," said 25-year-old protester Mauricio Valladares.
Amnesty International and Human Rights Watch had already weighed in, denouncing the removals as a dangerous power grab.
Just minutes after the vote to dismiss them on Saturday night, the five judges issued a ruling invalidating the legislative action, declaring it an unconstitutional attack on democracy and plunging the country into an uncertain political and legal battle.
But over the course of the next few hours lawmakers representing the president's newly emboldened New Ideas party voted to replace the judges as well as an attorney general.
Police were then called in to escort the new judges and prosecutor to their new offices.
The five ousted judges - the most powerful jurists on the 15-member court - were among the few remaining checks on Bukele's power.
Bukele accused them of impeding the government's health strategy amid the COVID-19 pandemic.
Later on Sunday, one of the five judges reportedly quit.