Venezuela’s new constituent assembly has voted to sack top prosecutor Luisa Ortega, during its first day of work.
Ms Ortega, a vocal critic of left-wing President Nicolás Maduro, had opposed the assembly’s inauguration on Friday, citing allegations of voting fraud.
Security forces have surrounded her office in the capital Caracas, in what she has called a “siege”.
Mr Maduro says the new body is needed to bring peace after months of protests sparked by economic hardship.
On Saturday the assembly – which is dominated by government supporters – decided to remove Ms Ortega from office in a unanimous vote.
Earlier, dozens of National Guard officers in riot gear took up position around her office. Sharing pictures of the scene, she tweeted: “I reject the siege of the headquarters of the public prosecutor’s office”.
“I denounce this arbitrary act before the national and international community,” she added.
Ms Ortega was aligned with the government until she broke ranks in March. She took many Venezuelans by surprise when she went on live television to denounce the Supreme Court’s attempt to strip the opposition-controlled National Assembly of its powers.
The following month, she published a statement defending the right of citizens to hold peaceful protests. In June, she challenged President Maduro’s plan to create a constituent assembly.
She was consequently labelled a “traitor” by party officials and, by the end of June, she was facing a possible trial by the Supreme Court, for allegedly committing “grave errors” in her role.
She was also banned from leaving the country and her assets were seized.
On Thursday she called an independent audit of the recent public vote for the constituent assembly.
The opposition, which has controlled the National Assembly since elections in 2015, boycotted last Sunday’s vote. It says the constituent assembly is a way for the president to cling to power.
The new body has the ability to rewrite the constitution, and could override the National Assembly.
Despite being oil-rich, Venezuela is experiencing severe shortages of food and medicines, as well as inflation in excess of 700%. Violent demonstrations since April have left more than 100 people dead.
On Friday in Caracas, police used tear gas against opposition protesters who tried to reach parliament.
Several people were injured as security forces tried to disperse a few hundred demonstrators, reports say.
In other parts of the city, thousands of government supporters gathered to cheer and wave flags as the new members took office. Some carried pictures of late leader Hugo Chávez and the independence hero Simón Bolivar.
Among those sitting for the first time in the constituent assembly are Mr Maduro’s wife and son.
A close ally of Mr Maduro, former Foreign Minister Delcy Rodriguez, was elected president of the assembly.
Her opening speech attacked the opposition as “fascist” and warned the international community not to interfere.
She also indicted that high-profile opponents could expect swift action against them.
Earlier in the week, politician Jorge Rodríguez, an ally of the president, said it was only a matter of time until Ms Ortega would be removed from her post.