Venezuela is headed for a fresh showdown as President Nicolas Maduro prepares to inaugurate a powerful new "Constituent Assembly" on Friday, with his opponents vowing massive protests and state prosecutors seeking to block him in court.

Maduro faces mounting accusations at home and abroad of trampling on democracy with the election of the assembly on Sunday, in a vote boycotted by the opposition and allegedly marred by fraud.

Attorney General Luisa Ortega's office said on Twitter that two state prosecutors had filed a court case to block Friday's inauguration, "based on suspected crimes committed" during the election.

Ortega, one of Maduro's most vocal critics, had said on Wednesday that she had ordered an investigation into "scandalous" electoral fraud after a British technology firm contracted to handle the vote said Maduro had exaggerated the turnout.

READ MORE: Venezuela's crisis explained from the beginning

Since all candidates for the assembly were Maduro allies, turnout was the key gauge of public support.

The 545-member assembly - whose members include Maduro's wife and son - will have sweeping powers to dissolve the opposition-majority congress, pass laws and write a new constitution.

It was initially due to start work on Thursday against a backdrop of opposition protests.

On Wednesday night, Maduro rescheduled the inauguration to Friday, vowing the assembly would open "in peace and calm."

But his opponents pushed back their protest as well, calling on Venezuelans to "defend the constitution".

'Tampered with'

Venezuela is in the grips of four months of violent protests that have left more than 125 people dead as opposition demonstrators armed with stones and Molotov cocktails battle security forces and armed motorcycle gangs of Maduro supporters.

Maduro insists the new assembly is the solution to a drawn-out economic and political crisis gripping Venezuela, whose 18-year-old, oil-fueled socialist economic model has been driven to the brink of collapse by a plunge in global crude prices.

Sunday's vote brought the crisis to a boiling point, drawing international condemnation.

The United States imposed direct sanctions on Maduro, calling him a "dictator," while the European Union joined the US, Mexico, Colombia and Argentina in saying it would not recognise the new assembly.

The condemnation escalated after British technology firm Smartmatic had said official figures from the election were "tampered with" to make turnout appear greater than it was.

Ortega said the firm's assessment was just "one more element of the fraudulent, illegal and unconstitutional process".

Maduro denied the accusation, dismissing it as a "reaction by the international enemy".

Smartmatic chief executive Antonio Mugica said the firm had concluded "without any doubt" that turnout was manipulated.

"We estimate the difference between the actual participation and the one announced by authorities is at least one million votes," he said Wednesday at a London press briefing.

OPINION: Maduro is not Chavez

Venezuela's pro-government electoral authority had claimed more than eight million voters took part - 40 percent of the electorate.

The opposition says turnout was closer to 3.5 million and claims it was mostly state employees fearful for their jobs.

The opposition had held an unofficial referendum on July 16 in which it said 7.6 million Venezuelans voted against the new assembly - just under the level of support the government claimed on Sunday.

More than 70 percent of Venezuelans oppose the new assembly, according to polling firm Datanalisis.

Maduro consolidates authority

Maduro moved swiftly to consolidate his authority after the election.

Two prominent opposition leaders were taken to jail in the middle of the night by armed members of the Venezuelan intelligence services.

Delcy Rodriguez, a former foreign minister who is now part of the new body, said the Constituent Assembly would kick the MPs out of the legislative palace, take it over, and "never leave".

UN Secretary General Antonio Guterres has urged Maduro's government to "lower tensions," while the European Union says it is "ready to gradually step up" action on Venezuela if the situation deteriorates further.

Michael McCarthy, a research fellow at the Center for Latin American Studies, told Al Jazeera that Maduro's objective in creating the assembly was to "rewrite the rules of the game for political competition in the country".

"Maduro made this move because the government's ruling coalition has in the past three years seen its support deteriorate precipitously and it no longer commands the majority," he said.

"So the government needed to find a way - a new formula, if you will - to consolidate power in the midst of a very deep economic depression that has caused a humanitarian crisis in the country and has created great political discontent with the incumbents."

McCarthy said the general prosecutor's efforts to investigate allegations of fraud were significant but unlikely to be successful.

"It's important to raise the costs of the government to go down this path. But the truth of the matter is that the Maduro government has the backing of the military. And so while it's not a majority [supported government], it does have the firepower," he said.