Venezuela has inaugurated a controversial new legislative superbody that is expected to rewrite the constitution and give vast new powers to the ruling Socialist Party.

The move defies worldwide condemnation that the new assembly undermines democratic freedoms.

President Nicolas Maduro says the 545-member assembly, which was elected on Sunday in a vote boycotted by the opposition, will bring peace to a nation beset by violent protests and a profound economic crisis.

The assembly unanimously elected well-known Socialist Party leaders to its leadership, with former foreign minister Delcy Rodriguez to serve as the President, and former vice president Aristobulo Isturiz as First Vice President.

"This national constituent assembly, convened by President Nicolas Maduro, is hereby formally inaugurated," Ms Rodriguez said.

Her first speech to the body was a homage to late president Hugo Chavez, who she referred to as "our eternal commander."

The assembly will function in the same downtown Caracas palace complex as the existing opposition-run congress, which could potentially be dissolved by the new all-powerful body.

The two bodies are expected to hold sessions in parallel, separated by an ornate cobblestone courtyard.

Governments ranging from Latin American neighbors to the United States and European Union have condemned the vote, with the Vatican making a last minute plea for authorities to

Socialist Party officials converged on congress in a festive march in which they carried portraits of independence hero Simon Bolivar and Chavez, whose image was removed by the opposition legislators when they took over in January 2016.

The delegates to the assembly sang the national anthem, led by a recording of the voice of the late Chavez.

The assembly's election on Sunday prompted US President Donald Trump to label Mr Maduro a dictator, a term the opposition has long used to describe the unpopular leader.

Brazil on Friday recommended that Venezuela be suspended from trade bloc Mercosur until it returns to democracy.

Antonio Ledezma (left) has been returned to his home

Meanwhile intelligence agents have returned opposition leader Antonio Ledezma to his home, where he is serving house arrest, after taking him to prison early on Tuesday, Ms Ledezma's wife said via Twitter.

Ms Ledezma and fellow opposition leader Leopoldo Lopez, who the opposition and many in the international community describe as political prisoners, were jailed after being accused of destabilising the government of President Nicolas Maduro.

It was not immediately evident whether Mr Lopez would also be returned to house arrest.

"Several minutes ago, Antonio was unexpectedly returned by the Sebin (intelligence agency) to our home," Mitzy Capriles de Ledezma wrote on Twitter.

"We thank the people of Venezuela and the international community for their concern and solidarity."

Prior to Tuesday’s raid the two men had called for protests against the creation of a constituent assembly, which opposition leaders and governments around the world have described as an assault on basic freedoms in Venezuela.