Venezuelan security forces have surrounded the office of Chief Prosecutor Louisa Ortega in Caracas, in what she has called a “siege”.
It comes a day after the government inaugurated a controversial new constituent assembly.
Ms Ortega, a critic of President Nicolás Maduro, had asked a local court to stop the assembly’s installation.
She cited allegations that the government misrepresented the results of the vote that created the body.
President Maduro, a left-winger who says the body is needed to bring peace after months of protests sparked by a spiralling economic crisis, has dismissed the claims.
“I reject the siege of the headquarters of the public prosecutor’s office,” Ms Ortega wrote on Twitter on Saturday, sharing pictures of the scene.
Dozens of officers of the National Guard were shown, lining up behind riot shields.
“I denounce this arbitrary act before the national and international community,” she added.
Ms Ortega was aligned with the government until she broke rank 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.
On Thursday she called an independent audit of the vote on the constituent assembly.
But the opposition says the new body, which has the ability to rewrite the constitution, is a way for the president to cling to power.
It could also override the National Assembly.
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.