Venezuelan opposition leader Juan Guaidó was forcefully blocked by national guardsmen Sunday from presiding over a congressional session where his rivals ultimately elected a substitute leader as new congress chief.

Guaidó, 36, and his supporters blasted the move, calling it a hijacking of the country's last democratic institution.

After the guardsmen prevented lawmakers including Guaidó from entering the National Assembly, the U.S.-backed leader tried to mount an iron fence surrounding the legislature, only to be repelled again.

A similarly rowdy situation broke out inside as rival lawmakers headed by Luis Parra tried to swear themselves in as legislative leaders with the support of socialist deputies loyal to disputed President Nicolás Maduro.

The opposition claimed there was no valid vote for Parra. Guaidó, who has held a comfortable majority in the 167-seat assembly, immediately denounced the impromptu session as a "show" carried out by a group of "traitors" in cahoots with Maduro.

Maduro officials celebrated the gambit as a comeuppance for Guaidó, who has been struggling to maintain unity in the unwieldy opposition coalition.

Parra, meanwhile, called a session for Tuesday, setting up a fight over rival claims to the legislature's leadership in the days ahead.

VENEZUELA'S CURRENCY SO WORTHLESS IT'S MOSTLY BEING USED FOR MAKING CRAFTS

A year ago, Guaidó asserted that his position as the legislative leader made him Venezuela's interim president in place of Maduro, whose 2018 reelection has been rejected as invalid by the legislature, as well as by the U.S., European Union and several Latin American governments.

There was no indication of weakening support among the dozens of governments that recognized Guaidó as Venezuela's rightful leader. Brazil's government called the session an "affront to democracy," while the top-ranking U.S. diplomat in Latin America called Sunday's events in the chamber a "farce."

"This morning's phony National Assembly session lacked a legal quorum. There was no vote," Michael Kozak, the acting assistant secretary for the State Department's Bureau of Western Hemisphere Affairs, tweeted.

Guaidó faced a major test in articulating a new vision in his campaign to remove Maduro, but his re-election for a second straight year as the head of the congress had been widely expected.

The weeks leading up to Sunday's vote were marked by tension, with the opposition denouncing a covert government campaign to intimidate and bribe lawmakers into voting against Guaidó.

Parra was one of a handful of lawmakers who broke with Guaidó and have since been expelled from their parties for alleged involvement in a corruption scandal involving Maduro allies.

Socialist lawmakers argued that Guaidó's absence forced them to initiate their session without him, but all day, opposition lawmakers faced resistance by security forces who set up several barricades downtown.

Support for Guaidó inside the opposition has taken a hit since several minority parties in November splintered off to create a separate bloc to negotiate directly with Maduro.

The small group of opposition lawmakers who broke with Guaidó argued that by sticking to a naive plan of removing Maduro by force, he has put his political ambitions above the needs of Venezuelans who have had to endure an economy in shambles.

Though the country sat atop vast oil and mineral resources, it has been imploding economically and socially in recent years. Critics blamed Venezuela’s woes on years of failed socialist rule and corruption, while Maduro's supporters said U.S. sanctions were taking a toll on the economy.

Maduro, who took over after the 2013 death of former President Hugo Chávez, has maintained military backing and control over most branches of the government, despite the deepening crisis.

CLICK HERE TO GET THE FOX NEWS APP

He has accused Guaidó of being a puppet of the United States. Maduro also said he's determined to win control of the National Assembly in elections later this year.

The Associated Press contributed to this report.