They said the clashes erupted after a convoy of armoured vehicles entered Tripoli from the airport road and headed for the General National Congress (GNC) building.
GNC members were evacuated from the building after gunmen in civilian clothes attacked the building, according to a member of the interim parliament, who could not identify the assailants.
Witnesses said the gunmen were members of the powerful Zintan brigades of former rebel fighters that control several zones in southern Tripoli around the capital's airport.
Militias have carried out several attacks on the GNC, including on March 2 when two deputies were shot and wounded.
The latest violence in Tripoli came after deadly fighting in the eastern city of Benghazi on Friday, when a rogue general unleashed his so-called "National Army" on Islamist militiamen.
It was not immediately clear if there was any link to the Benghazi clashes in which at least 79 people were reported killed.