Dozens of pro-government activists have stormed the grounds of Venezuela's National Assembly and attacked politicians, leaving several injured.

Intruders brandishing sticks and dressed in red broke through the front gate and set off fireworks in the interior gardens of the building on Wednesday, AFP journalists at the scene said.

The government supporters reached as far as the corridors of the congressional building, striking and injuring at least five politicians.

The crowd had gathered just after dawn outside the National Assembly building in downtown Caracas, chanting in favour of President Nicolas Maduro.

READ MORE: Venezuelan government accused of illegal detentions

The attackers ordered journalists to stop filming and taking photographs and leave the premises.

After the morning attack, a crowd of about 100 people, many dressed in red and shouting "Long Live The Revolution!", trapped politicians, reporters and guests inside for hours, witnesses said. Some of those who had been caught inside were able to start leaving at dusk.

The seriously injured politicians were taken to hospital once the national guard had secured the grounds.

The opposition-controlled legislature was holding a special session to mark independence day when the government supporters burst in.

Al Jazeera's Alessandro Rampietti, reporting from Cucuta on Colombia's border with Venezuela, said two politicians were seriously injured and bleeding heavily from head wounds.

"Protests by government supporters have become the norm every time the opposition-controlled assembly is in session, but we have never seen this kind of violence before," he said.

Tension is high in Venezuela after three months of anti-government protests in which 91 people were killed in clashes with police.

Protesters blame President Maduro for a desperate economic crisis. He said the chaos is the result of a US-backed capitalist conspiracy by the opposition.

Before the violence broke out on Wednesday, Maduro's vice-president Tareck El Aissami had made an impromptu appearance in the Congress along with the head of the armed forces, Vladimir Padrino Lopez, and ministers.

During his visit, El Aissami called on supporters of Maduro to come to the legislature to show support for him.

A crowd of Maduro supporters had already been rallying outside the building for several hours before breaking into the grounds.

Maduro retains the public backing of the military high command - a key factor in keeping him in power, according to analysts.

TIMELINE: Key moments in Venezuela's crisis

Government and opposition have accused each other of using armed groups to sow violence.

The opposition has accused plainclothes armed pro-government groups of attacking protesters.

While the chaos erupted in the grounds of the assembly, Maduro was watching a military parade in another part of Caracas, with troops marching and armoured vehicles rumbling by.

In a speech at the parade, he demanded that the military be "ever loyal, never traitors".

"Let no one become a Trojan horse," he said. "Let no one become a servant of the oligarchy."