Witnesses said that around 30 vehicles, some mounted with anti-aircraft guns, and unidentified armed men have encircled the foreign ministry in Tripoli since Sunday, demanding it sack officials from the previous regime of Moamer Kadhafi.
Banners demanding the adoption of a law that would enforce the expulsion of Kadhafi-era officials were Monday plastered on the gate of the ministry building.
"The ministry is closed," Aymen Mohamed Aboudeina, one of the protesters said adding that "talks will be initiated in the coming hours with the concerned ministries".
He said the siege would be lifted when the protesters' demands are met through a vote in the General National Congress -- the highest political authority in Libya -- on a bill calling for the expulsion of former regime employees.
Separately, a group of angry police officers entered the compound of the interior ministry on the airport road, firing their guns into air and demanding promotions and salary hikes, witnesses said.
"The situation has calmed down now. Officers just wanted to make their voices heard against injustices", a security source told AFP.
On Sunday, Prime Minister Ali Zeidan denounced the encircling of the foreign ministry and other attacks targeting the interior ministry and the national television in Tripoli.
He appealed to Libyans to support the government in resisting armed groups "who want to destabilize the country and terrorize foreigners and embassies," but added that the government would "not come into confrontation with anyone".
The Congress is studying proposals for a law to exclude former Kadhafi regime officials from top government and political posts.
The proposed law could affect several senior figures in the government and has caused waves in the country's political class.
In March, demonstrators encircled the assembly itself, trapping members in the building for several hours as they called for the adoption of the law.
After the siege was lifted, gunmen targeted Congress chief Mohammed Megaryef's motorcade.
Libya's government is struggling to assert its influence across the country, where former rebels who fought Kadhafi in the 2011 uprising still control large amounts of territory.