This article is more than
7 year oldWitnesses said the confrontation came after an assembly session to mark the country's Independence Day.
Military police guarding the site stood by as intruders brandishing sticks and pipes broke through the gate, AFP said.
Venezuela has been shaken by often violent protests in recent months and is in economic crisis.
The speaker of the assembly, Julio Borges, named five of those injured on Twitter. Some were taken away for medical treatment.
"This does not hurt as much as seeing every day how we are losing our country," deputy Armando Armas told reporters as he got into an ambulance, his head swathed in bloody bandages.
Two employees of the assembly were also hurt, witnesses said.
Venezuelan newspaper Tal Cual blamed the attack on militias known as "colectivos", and said the group fired rockets and bangers as they forced their way in.
Its report said some of the deputies attacked "fell to the ground and were kicked".
Photos and videos circulating on social media showed victims of the assault with bleeding head wounds. At least one, identified as deputy Americo De Grazia, was carried out on a stretcher.
AFP, whose journalists were at the scene, said reporters were ordered to leave by the attackers, one of whom had a gun.
The violence unfolded while President Nicolás Maduro was giving a speech at a government-planned Independence Day military parade elsewhere in the capital.
Before the intruders rushed the building, his Vice-President Tareck El Aissami had made an impromptu appearance in the congress with the head of the armed forces, Vladimir Padrino Lopez, and ministers.
Mr El Aissami gave a speech urging the president's supporters to come to the legislature to show support for him.
A crowd had been rallying outside the building for several hours before breaking into the grounds.
Venezuela's National Assembly has been led by the opposition since elections in December 2015, and has become a focal point for critics of the president.
Anti-Maduro protesters have staged nationwide street protests against the government over the past three months which have seen violent clashes between demonstrators and the security forces.
At least 90 people have died in the bloodshed, with both political factions blaming each other.
Just hours before the scenes at the National Assembly, Venezuela's attorney general was facing suspension for refusing to appear in court.
The charges filed against Luisa Ortega Díaz come after she challenged President Maduro's reform plans.
The country's chief prosecutor says she is being legally pursued for defying the president.
But the Supreme Court, which is dominated by government loyalists, says Ms Ortega has committed serious errors.
The court has banned Ms Ortega from leaving the country and frozen all her assets.
"We already know that today I will be removed from my post," she told a news conference at the public prosecution department on Tuesday.
Last week, Ms Ortega strongly criticised President Maduro after an incident in which a stolen police helicopter flew over Caracas, dropping grenades and firing shots.
Venezuela helicopter attack: Who is pilot Oscar Pérez?
The president called it a "terrorist attack" but the chief prosecutor said the country was suffering from "state terrorism".
While Venezuelan security forces later found the abandoned helicopter near the coast, opposition politician and parliamentary Speaker Julio Borges said there was a possibility that the incident was a hoax.
On Tuesday, the fugitive policeman who piloted the helicopter, Oscar Pérez, posted a video online saying he was still in Caracas.
He urged Venezuelans to stand firm in the streets in protests against President Maduro.
Newer articles