Venezuela's chief prosecutor Luisa Ortega Diaz (centre) arrives for a session of the National Assembly in Caracas, Venezuela on Monday. Pix by REUTERS

CARACAS: Venezuela's chief prosecutor faces a court hearing Tuesday over alleged misconduct in what her allies say is punishment for challenging the government over the country's deadly political crisis.

Luisa Ortega, 59, is the most senior figure to defy President Nicolas Maduro as he fends off opposition efforts to remove him from power in the volatile oil-exporting nation.

Her stand has raised the prospect of a split in the government camp that could tip the balance in a power struggle.

Maduro is under mounting pressure after three months of unrest that prosecutors say have left 89 people dead.

Ortega launched a legal challenge against the government on human rights grounds and a case against Supreme Court judges.

Pro-government lawmaker Pedro Carreno responded by filing charges against Ortega alleging "serious errors in the carrying-out of her functions."

He also alleged she was suffering from "insanity" and should be fired.

The Supreme Court last week ordered her assets to be frozen and banned her from leaving the country.

On Tuesday it will examine Carreno's charges to decide whether Ortega should face trial.

Authorities searched Ortega's offices on Monday in what state comptroller Manuel Galindo called a "fiscal audit."

Ortega complained that officials had burst into her offices like a "riot." She insisted she would cooperate with an audit as long as they showed "respect."

Ortega was a traditional supporter of the "chavista" socialist movement launched by Maduro's late predecessor Hugo Chavez, but broke ranks with the current president in March.

She accused the Supreme Court of undermining democracy through a short-lived ruling that seized power from the opposition-led legislature. The opposition says the court is packed with Maduro's allies.

That court ruling was one of the moves that sparked the current wave of protests.

While demonstrators have clashed with riot police in the streets, Ortega's battle against the authorities has been waged in the courts.

As violence swelled over recent weeks, Ortega renewed her criticism of them, accusing police of killing protesters.

"We must fight for democracy... We must condemn violence wherever it comes from," she said on Monday in an address to lawmakers.

"Darkness does not last forever. It is up to us to see that sanity and unity prevail," she said. "Otherwise, anarchy will devour us."

Analysts say that Ortega's stand against Maduro could signal a split in the government camp.

The government has accused former interior minister and ex-intelligence chief Miguel Rodriguez Torres, a retired military commander, of plotting against it with US backing.

Maduro retains the public support of the head of the army, Vladimir Padrino Lopez -- a key factor for him to stay in power.

But the president last month said he was replacing four other senior commanders of the armed forces.

"Maduro's persecution of dissident chavistas will embolden the opposition to continue protesting, with increased repression stoking public outrage," said analysts from the Eurasia Group consultancy last week in a note.

Maduro has enraged his opponents meanwhile by launching a plan to form an assembly to rewrite the constitution.

Opponents say he will pack the "constituent assembly" with his allies to cling to power.

Voting for members of the assembly is scheduled for July 30. The opposition on Monday said it would hold a popular vote against that on July 16.

"The next major flashpoint will be the election on 30 July of delegates to the Constituent Assembly," Eurasia wrote.

"However, the political crisis is so fluid that the country could reach a tipping point before then." - AFP