El Salvador’s authoritarian president Nayib Bukele has moved to consolidate his grip on power following a landslide win in recent national elections, seizing control of the top court and replacing the attorney-general in a move condemned by the US and business leaders as well as opposition groups.

In a marathon first session of the new legislature that stretched into the night on Saturday, legislators from the ruling Nuevas Ideas party voted to fire and replace the five top judges at the supreme court who sit on its constitutional chamber.

After the court responded with a ruling that the congressional vote was unconstitutional, legislators voted to dismiss Raúl Melara as attorney-general, alleging he had ties to opposition conservative party Arena. They replaced him with Rodolfo Delgado, a former head of the attorney-general’s office against organised crime.

The new judges and Delgado took up their posts immediately, travelling to their offices under heavy police escort.

“And the Salvadoran people, through their representatives, said FIRED,” Bukele, a 39-year-old social media savvy populist, wrote on Twitter.

The events are likely to heighten tensions with Washington just as US president Joe Biden’s administration tries to tackle the rising number of migrants coming from El Salvador, Honduras and Guatemala.

US secretary of state Antony Blinken expressed his “grave concern” about the removal of the judges and attorney general on Sunday, the state department said. Speaking to Bukele, by phone, Blnken said an independent judiciary was essential to democratic governance and that Melara was an effective partner with the US on combating crime.

Biden’s administration has already voiced “worries” in the past over Bukele’s tactics, which have included disobeying supreme court rulings and sending troops into the national assembly to coerce legislators into approving his spending plans.

The populist leader tightened his grip on power in March’s legislative elections, in which Nuevas Ideas took 56 of the 84 seats in parliament, giving it a two-thirds supermajority.

But Bukele, who enjoys sky-high popularity ratings, bluntly told the foreign governments not to interfere. “With all due respect: We are cleaning house . . . and this doesn’t concern you,” he wrote on Twitter.

El Salvador’s business lobby, the National Association of Private Enterprise (Anep), condemned the weekend’s events as a “self-coup against the judiciary” that “represent an attack against democracy”. Bukele retorted in a tweet: “Those days when the Anep ruled . . . they aren’t coming back”.

Tiziano Breda, Central America analyst at the Crisis Group think-tank, noted that the dismissed judges had several times ruled against Bukele’s measures to control the Covid-19 pandemic. Saturday night’s events sent “a clear message to [Washington] DC and the world: we don’t care”, he said.

“If anyone in the Biden administration had any hope that Bukele was somehow committed to democratic rule,” tweeted José Miguel Cruz, a political analyst, “he is not. He never was.”

Jeannette Aguilar, a security analyst, wrote on Twitter: “Coup d’état in El Salvador. Bukele’s party illegally fires magistrates of the constitutional chamber [of the Supreme Court] and with that, takes control of the only power of the state that he did not have under his control.”

José Miguel Vivanco, executive director of the Americas division at advocacy group Human Rights Watch, warned Bukele: “We will make every effort for this assault on democracy to affect his relationship with the US government, the World Bank, the IMF and the Inter-American Bank.”

The IMF a year ago approved $389m in emergency financial assistance to El Salvador.

“If the international community and the Biden administration don’t accompany their strong words with strong actions . . . we’ll be the next Nicaragua or Venezuela,” Johnny Wright, an opposition legislator, told the Financial Times.