Venezuela's opposition leader Juan Guaido has again been sworn in as head of the opposition-controlled National Assembly amid a showdown for control of the parliament after his former opposition ally Luis Parra was sworn in as the rival congressional chief.

After a tense standoff with security forces early on Tuesday, Guaido entered the congress and began the first legislative session of the year.

The session followed an attempt by rival legislators to take control of the congress.

More:

Guaido has served as president of the National Assembly for the last year and used it as his platform to gain international recognition. He was expected to be re-elected as the legislature's leader on Sunday, but was blocked along with several other legislators from entering the congress.

Parra was sworn in after claiming to have won the votes of 81 legislators. The opposition refutes that tally and says 100 legislators, a majority, voted for Guaido in a legislative session held at a Venezuelan newspaper.

Maduro swiftly acknowledged Parra as speaker, saying that the congress had a "new board of directors".

"The current strategy from the administration is to create two National Assemblies," Carlos Pina, a political analyst told Al Jazeera.

"With this, Guaido will not be only perceived as the person who assumed the interim presidency in a 'self-sworn' manner, but also as the man who did the same with the presidency of the Assembly," he added.

Later on Tuesday, oppositions legislators sang the national anthem but electricity was cut off, leaving the politicians to use the torches on their mobile to provide light.

Legislators push one of the entrances of Venezuela's National Assembly building in Caracas [Fausto Torrealba/Reuters]

"They cut the electricity off as if they were going to hide the truth from the rest of the world," Guaido said.

"We are here [fighting for you] Venezuela," he added.

Venezuelan security forces reportedly fired tear gas at Guaido and his allied legislators after they left the session.

A 'rebellion'

Guaido was elected head of the congress in January 2019 and invoked Venezuela's constitution to assume an interim presidency, denouncing Maduro as a usurper who had secured re-election in a 2018 vote widely considered fraudulent.

The opposition leader has since been backed by dozens of countries including the US and UK.

However, Maduro retained the control of the armed forces while he accused the opposition of stirring up violence and of attempting a coup with the help of the US.

An attempted opposition-led military revolt in late April failed to generate widespread support as Maduro maintains his grip on the armed forces. Guaido's popularity has slipped and many Venezuelans now say they are reluctant to heed his call to demonstrate, seeing it as a risky measure unlikely to generate any change.

Venezuela sits atop vast oil and mineral resources, but it has been imploding economically and socially in recent years, which critics blame on Maduro. The South American nation's 30 million live with soaring inflation and shortages of gasoline, running water and electricity, among basic services.

An estimated 4.5 million residents have fled the country.