Gunmen surrounded Libya's foreign ministry on Sunday to push demands that officials who had worked for deposed dictator Muammar Gaddafi's regime be banned from senior positions in the new administration.
At least 20 pick-up trucks loaded with anti-aircraft guns blocked the roads while men armed with AK-47 and sniper rifles directed the traffic away from the building, witnesses said.
Tension between the government and armed militias have been rising in recent weeks since a campaign was launched to dislodge the groups from their strongholds in the capital.
Since Gaddafi was toppled by Western-backed rebels in 2011, oil exporter Libya has been awash with weapons and roving armed bands who are increasingly targeting state institutions.
Sunday's protest was to demand a law be passed banning officials who had worked for Gaddafi from occupying senior positions in the government. The legislation is under discussion but has yet to be approved.
"The Ministry of Foreign Affairs will remain closed until the political isolation law (against ex-Gaddafi officials) is implemented," the commander of the militia told Reuters. He added that the foreign ministry had been targeted because some officials employed there had worked for Gaddafi.