The offices of the Libyan justice ministry in Tripoli have been surrounded by armed men demanding the expulsion of officials who worked for the government during the Gaddafi era.
Men in pickup trucks equipped with anti-aircraft guns had asked the employees and justice minister to leave, a member of staff told the BBC.
The minister subsequently got into his car and left, the witness added.
The foreign ministry building has been blocked off by gunmen since Sunday.
The armed groups are calling for a political isolation law to be passed banning officials who served under the late Muammar Gaddafi from senior government posts.
However, Libyan officials have been unable to agree the terms of the law.
Armed groups have targeted state buildings in the past, storming the General National Congress (GNC) on several occasions.
“They came in the morning with their cars and surrounded the building. There are about 15 cars. They asked all the employees and the minister to leave the building. The minister got into his car and left,” an employee told the BBC.
“They were not aggressive. There was no shooting into the air or anything like that,” he added.
Since Sunday, armed groups have blocked off the roads leading to the foreign ministry building in Tripoli, although are not reported to have entered the ministry itself.
The image of an armed brigade blocking access to a public building had so far usually been reserved for Libya’s legislature, the BBC’s Rana Jawad in Tripoli says.
In March, protesters barricaded members of the GNC inside the building for hours, insisting they adopt the law keeping Gaddafi-era officials out of politics.
Since Gaddafi’s death, Tripoli and other Libyan cities have been plagued by violence and infighting.
The government has recently tried to dismantle militias that formed during and after the war that toppled the long-serving leader.
Last week, a car bomb explosion outside the French embassy in Tripoli injured left two French guards and caused serious damage.