About 100 government supporters have burst into Venezuela's opposition-controlled National Assembly, where they beat up several lawmakers.
Witnesses 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. The government vowed to investigate.
About 350 people were besieged for hours, the assembly's speaker said.
Julio Borges said on Twitter that 108 journalists, as well as students and visitors, were among those stuck inside.
Mr Borges also named five of the lawmakers injured. Some were taken away for medical treatment.
Venezuela has been shaken by often violent protests in recent months and is in economic crisis.
"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.
The US state department condemned the violence, calling it "an assault on the democratic principles cherished by the men and women who struggled for Venezuela's independence 206 years ago today".
Witnesses said several journalists and two assembly staff were also hurt.
Venezuelan newspaper Tal Cual blamed the attack on militias known as "colectivos", and said the group had 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, believed to be 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, Vice-President Tareck El Aissami 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.
In a statement via the ministry of communication, the government said it "condemns the alleged acts of violence in the gardens of the Federal Legislative Palace".
"The national government has ordered the investigation of the aforementioned acts of violence to establish the whole truth, and on that basis, to apply sanctions to those responsible," it said.
What's happening in Venezuela?
The country is in a deep economic crisis, made worse by the falling price of oil, which accounts for about 95% of its export revenues and was used to finance some of the government's generous social programmes. Forced to make cuts, Mr Maduro has seen his support fall among core backers.
Also, as a result of the crisis, parts of Venezuela face severe shortages of basic supplies such as medicine and food
The opposition accuses Mr Maduro of not only mismanaging the economy but also eroding the country's democratic institutions.
In March, the Supreme Court decided it would take over the National Assembly. The decision was reversed, but Mr Maduro was accused by opponents of trying to stage a coup. That sparked almost daily protests calling for his resignation.
Meanwhile, Mr Maduro says the opposition is trying to overthrow his government illegally, and blames the country's problems on an "economic war" being waged against him
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.
President Maduro was attending Independence Day celebrations as the violence broke out
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 came after she challenged President Maduro's reform plans.
She 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.