General Khalifa Haftar
General Khalifa Haftar attends a news conference in Abyar, a small town to the east of Benghazi Reuters

Heavy gunfire has been heard outside the Libyan interim parliament in the capital Tripoli and the gunmen have also set fire to the building.

A spokesman for General Khalifa Haftar said his forces were responsible for the raid. The gunfire reportedly came from anti-aircraft weapons and rocket propelled grenades, according to News24.com.

Local Libyan TV reported that General National Congress (GNC) president Abu Sahmain and seven other MPS have been kidnapped, but these are unconfirmed reports.

A joint statement from Libya's government, army and congress has denounced General Haftar's actions as an attempted "coup", according to Mary Fitzgerald, a journalist working in Libya.

General Haftar's spokesman Mohammed al Hegazi told television channel Alahrar that the offensive was carried out in order to arrest Islamists, but General Haftar's forces were met with resistance.

"These are members of the Libyan National Army," he said, using the name of the forces commanded by General Haftar.

This image reportedly shows members of Libya's GNC being arrested by military in Tripoli
This image reportedly shows members of Libya's GNC being arrested by military in Tripoli Twitter Fatima Said @fattysaid

Al Hegazi called the parliament the "heart of the crisis" in Libya, and added: "This parliament is what supports these extremist Islamist entities.

"The aim was to arrest these Islamist bodies who wear the cloak of politics."

A journalist from the Associated Press news agency reported seeing militias armed with machine-gun mounted vehicles near the building.

The parliament is split between Islamist and non-Islamist forces who have argued over choosing a new government and holding fresh elections.

A security official said the gunmen have also shelled a nearby military base controlled by an Islamist militia.

The Al Qaaqaa and Sawaaq militias are both based near the parliament. They operate under the government's mandate but support non-Islamist political forces.

General Hafter is said to be waging an offensive against militants in Libya's second largest city, Benghazi.

Authorities have accused him of carrying out a coup, but General Hafter has said they have no mandate and has vowed to continue.

More than 70 people were killed on Friday in clashes between irregular army forces and Islamist militants in Benghazi.