Libya's parliament passed a law on Sunday banning anyone who held a senior position during Muammar Gaddafi's 42-year rule from working for the new administration, a move that could force the prime minister to step down.
Prime minister Ali Zeidan was a diplomat before defecting and joining the opposition in 1980, but the wording of the new law has not made it clear whether or not he was senior enough to be barred from the new government.
"I don't know, the wording is quite unclear," said a source within the prime minister's office when asked whether Zeidan would have to step down. It would depend on how the law was implemented, he said.
Tripoli's skies erupted with gunfire in celebration after the vote and the main square filled with supporters of the legislation.
The wording has been wrangled over for months and Sunday's vote has been prompted by the actions of heavily armed groups who have taken control of two government ministries and say they will not leave until the legislation is passed.
More than a dozen vehicles mounted with anti-aircraft weapons and machine guns remained parked outside the Justice Ministry on Sunday, and the Foreign Ministry has been similarly encircled for the past week.
One of the men stationed in front of the Justice Ministry, who said the group came from different areas close to the capital Tripoli, said they would not leave until the prime minister had been forced from office.
"We have been asking them to deal with Gaddafi's friends for a year," he said.
Diplomats in Tripoli have complained that holding the vote under duress has undermined its legitimacy, while a human rights group called on parliament to reject the latest draft.
"This law is far too vague - potentially barring anyone who ever worked for the authorities during the four decades of Gaddafi's rule" said Sarah Leah Whitson, a Human Rights Watch director in the region.
While it remains unclear whether the new law applies to the prime minister, the leader of the assemblyMohammed Magarief - a former ambassador - will have to step down, despite living in exile since the 1980s when he became a prominent figure in Libya's oldest opposition group.
Congress members say the law could be applied to around 40 others in the 200-member parliament.
The cabinet and Libya's official armed forces are so weak that swathes of the oil-producing desert country remain outside central government control.
The gunmen who played a pivotal role in the revolt that toppled Gaddafi have never left the capital and are more visible than Libya's military.
Soldiers stationed in the main square to protect a pro-government protest on Friday have now left, although a number of army vehicles remained outside a central bank building nearby.