Clashes have erupted outside the Libyan parliament in the capital, Tripoli, in an attack being claimed by forces loyal to a retired army general accused of launching a coup attempt.

Forces said to be loyal to a retired Libyan major general, Khalifa Haftar, stormed the General National Congress on Sunday and challenged the legitimacy of parliament.

Al Jazeera's Omar al-Saleh, reporting from Tripoli, said the city had "turned into somewhat a battlefield".

Saleh quoted eyewitnesses as saying a large convoy of vehicles with heavy machine guns stormed Congress. "There were a few cars set on fire. There was heavy fighting. The situation is very tense." 

At least two people died and as many as 55 were wounded as a result of the violence.

Saleh said a spokeman for Haftar claimed the attackers were affiliated with Haftar's forces.

A former military police officer, Colonel Mukhtar Fernana, read out a statement on al-Ahrar television on behalf of Haftar. "We announce the freezing of the GNC," Fernana said, according to Reuters news agency. It is not clear where he gave the address.

Fernana also said parliament should hand power to the 60-member body elected to rewrite Libya's constitution. 

The Libyan News Agency said the forces attacking parliament belonged to the Zintan brigade, a rebel group from 170km south-west of Tripoli, which controls the city's international airport.

But Zintan forces have not yet said the attack was undertaken for Haftar. 

Benghazi clashes

The retired general has been carrying out a military campaign in Benghazi - using government aircraft and troops without authorisation - against Islamist militias since Friday.

At least 70 people have died and another 140 have been injured in the campaign.

Haftar vowed to press on with his operation after Libya's interim Prime Minister Abdullah al-Thinni on Saturday denounced his forces as "outlaws" and called on all parties to observe restraint.

On Sunday he was preparing to renew his offensive in the eastern city after being accused by the authorities of an attempted coup.

In a press conference on Sunday, he denied his actions amounted to a coup attempt.

"This is not a coup against the state and we are not seeking power and authority," Haftar said. "Terrorism and its servants want it to be a battle so let it be an honourable one."

Early on Monday, the violence escalated as unknown attackers fired rockets at Benghazi's Benina airport. Authorities had closed the airport on Friday for security reasons.

Libya has been struggling with chaos as its government, parliament and nascent armed forces are unable to impose their authority over brigades of former rebels and militias who helped oust Muammar Gaddafi in 2011 but now defy the state.

Source: Al Jazeera and agencies