GENEVA (Reuters) - The United Nations on Friday criticized President Nicolas Maduro’s government for curtailing the powers of the chief state prosecutor and called on it to uphold the rule of law and freedom of assembly in Venezuela amid a clampdown on protesters.

Venezuela's President Nicolas Maduro speaks during a gathering in support of him and his proposal for the National Constituent Assembly in Caracas, Venezuela June 27, 2017. Miraflores Palace/Handout via REUTERS

Critics of Maduro have taken to the streets almost daily for three months to protest against what they call the creation of a dictatorship. The protests, which have left nearly 80 dead, frequently culminate in violent clashes with security forces.

Ruling Socialist Party officials have launched a series of attacks against chief state prosecutor Luisa Ortega, from accusations of insanity to promoting violence, after her high-profile break with the government.

“The decision by the Venezuelan Supreme Court on 28 June to begin removal proceedings against the Attorney General, freeze her assets and ban her from leaving the country is deeply worrying, as is the ongoing violence in the country,” U.N. human rights spokesman Rupert Colville told a Geneva briefing.

The Supreme Court’s Constitutional Chamber has nullified Ortega’s appointment of a deputy attorney general, naming someone else in violation of the law, he said. It also transferred some of her functions to the ombudsperson.

“Since March, the Attorney General has taken important steps to defend human rights, documenting deaths during the wave of demonstrations, insisting on the need for due process and the importance of the separation of powers, and calling for people who have been arbitrarily detained to be immediately released,” Colville said.

The U.N. human rights office was concerned the Supreme Court’s decision “appears to seek to strip her office of its mandate and responsibilities as enshrined in the Venezuelan Constitution, and undermine the office’s independence”.

“We urge all powers of the Venezuelan state to respect the constitution and the rule of law, and call on the government to ensure the rights to freedom of peaceful assembly and freedom of opinion and expression are guaranteed,” Colville said.

Maduro says the demonstrations are an attempt to overthrow him with the support of Washington.

The United Nations has received increasing reports that security forces have “raided residential buildings, conducted searches without warrants and detained people, allegedly with the intention of deterring people from participating in the demonstrations and searching for opposition supporters,” Colville said.