Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

CARACAS, Venezuela — Venezuela's new pro-government constituent assembly on Saturday removed dissident state prosecutor Luisa Ortega from her job, in what critics called a blatant affront to democracy.

Since the opposition started a round of protests in April, Ortega has become President Nicolas Maduro's main challenger from within the ruling socialist movement, accusing him of human rights abuses.

The new constituent assembly, which Ortega said was fraudulently elected last weekend, unanimously decided to remove her in its first session on Saturday. Earlier in the day, security forces had taken up position in front of her office, blocking Ortega from entering the building. She left on a motor bike amid the chaos.

Venezuela's chief prosecutor Luisa Ortega, center, one of President Nicolas Maduro's most vocal critics, is surrounded by people and national guards during a flash visit to the Public Prosecutor's office in Caracas on Aug. 5, 2017 as national guard units are posted at the entries and exits to the building. Ronaldo Schemidt / AFP - Getty Images

The constituent assembly replaced Ortega with human rights ombudsman Tarek Saab, a government ally whom the opposition says has turned a blind eye to state abuses.

The new legislative body has no checks on its powers, and critics say the decision to remove Ortega is an ominous sign of a swerve by Maduro into full-blown dictatorship.

"The constituent assembly is solving Maduro's political problems, handing out quotas, and lynching institutions," said opposition lawmaker Jose Manuel Olivares after news of Ortega's removal.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The head of the Organization of American States condemned what he called a "flagrant violation" of the prosecutor's institutional independence. And the Inter-American Court of Human Rights, an autonomous arm of the OAS, granted "precautionary measures" of protection for Ortega, saying she faces imminent risk of harm after senior officials linked her to alleged "terrorism."

Members of the National Guard are seen outside the Public Ministry in Caracas on Aug. 5, 2017. Venezuela's chief prosecutor Luisa Ortega, one of President Nicolas Maduro's most vocal critics, said Saturday the public prosecutor's office was under "siege" by the military. "I reject the siege of the headquarters of the Public Prosecutor's office. I denounce this arbitrary act before the national and international community," Ortega wrote on Twitter. Ronaldo Schemidt / AFP - Getty Images

The constitutional assembly was seated despite strong criticism from the United States, other countries and the Venezuelan opposition, which fear the assembly will be a tool for imposing dictatorship. Supporters say it will pacify a country rocked by violent protests.

Its installation is virtually certain to intensify a political crisis that has brought four months of protests in which at least 120 people have died and hundreds more have been jailed.

Related: Nicolas Maduro's Path from Bus Driver to President

Maduro vows the assembly will strip opposition lawmakers of their constitutional immunity from prosecution, while members of congress say they will only be removed by force.

Venezuelan President Nicolas Maduro celebrates election results after a national vote on his proposed Constituent Assembly at Plaza Bolivar in Caracas on July 31. Nathalie Sayago / EPA

But the opposition is struggling to regain its footing in the face of the government's strong-arm tactics and the re-emergence of old, internal divisions. Several opposition activists have been jailed in recent days, others are rumored to be seeking exile and one leader has broken ranks from the opposition alliance to say his party will field candidates in regional elections despite widespread mistrust of Venezuela's electoral system.

In a sign of its cowered and demoralized state, only a few hundred demonstrators showed up for a Friday protest against the constitutional assembly, one of the smallest turnouts in months. Those who did turn out said fear of arrest — rights groups claim there are more than 600 "political prisoners" jailed during the protests — may be keeping people at home but urged Venezuelans to remain mobilized.

"This is what the constitutional assembly will bring: more repression," opposition lawmaker Miguel Pizarro said.

However, Maduro accuses his opponents of using violence and argues that the constitutional assembly is the best way to restore peace. On Friday he heralded security forces who have been on the front lines of daily street battles, claiming that 580 of them had suffered serious injuries from attacks by "terrorist" protesters.

"I feel deeply the wounds of each one of you," Maduro said addressing a small group of injured national guardsmen. "With your bodies as your shield, you have defended the right to peace."

An increasing number of foreign governments have sided with the opposition, refusing to recognize the constitutional assembly and further isolating Maduro's government.

On Friday, the Vatican urged Maduro to suspend the new body, expressing "deep worry for the radicalization and worsening" of the turmoil in Venezuela. President Donald Trump and his French counterpart, Emmanuel Macron, agreed that Maduro must restore the rights of the Venezuelan people in a phone call, according to a readout of the conversation by the White House.

Foreign ministers from several South American nations said they will gather Saturday in Brazil for an emergency meeting to decide whether to expel Venezuela from the Mercosur trade bloc for violating its democratic norms. Venezuela was suspended from the group in December.