With government buildings surrounded by heavily-armed militias and a country divided on the direction of its young democracy, Libya was braced yesterday for the consequences of a new law that would exclude officials from the regime of the late autocrat Muammar Qaddafi from holding office.
Several prominent politicians could lose their jobs, including the president, Mohammed Magarief, who served as ambassador to India more than 30 years ago, and the prime minister, Ali Zeidan, who was also a former diplomat.
The rule, passed by the General National Congress on Sunday, will take effect next month and provides for a committee to adjudicate on who is eligible to hold office. The law has been enthusiastically backed by some politicians and those who fought in the 2011 armed uprising, who call for accountability for those involved in violence and injustice under the former regime.
But there are worrying parallels with similar laws, such as in Iraq following the ouster of Saddam Hussein, which have led to bitter charges of discrimination along sectarian lines.
A law which banned people associated with Hussein's ruling Baath party from holding office became a point of contention in which whole Sunni-dominated areas of Iraq, such as his hometown of Tikrit, complained of being victimised by the Shiite-dominated committee implementing the legislation.
Human-rights groups in Libya immediately expressed concerns that the Political Isolation Law contained vague language: it could exclude anyone deemed to have opposed the revolution that overthrew Qaddafi, leaving it open to abuse and promoting a culture of revenge.
The law "violates human rights and Libya's provisional constitution because it allows for guilt by association rather than provable misdeeds", said Hanan Salah, the Human Rights Watch representative in Libya, in a statement. "The provisions and procedures for exclusion are overly broad and vague … this law is deeply flawed."
However, it was greeted with delight by the groups of armed men who have surrounded several ministries - including the justice and foreign affairs buildings - intermittently over the past several months, calling for the law to be passed.
Demonstrations over the law have recently been largely peaceful, but the presence of pickup trucks with anti-aircraft weapons on the streets was enough of an intimation of violence for hundreds of people to march in a counter-protest last Friday, calling for the rule of law and for the end of the presence of militias on the streets.
Two years on from the beginning of the uprising, groups that were once rebel brigades have proven difficult to bring under the command of the police or army, and have repeatedly demonstrated - sometimes firing weapons and making threats - to push the interim governing body to make political decisions according to their wishes.
Yesterday, local media reported that armed men gathered outside the prime minister's office, calling for him to resign.
"It is not nice. It is not good at all," said Soliman Gajam, a General National Congress member from the west of the country. "We have the law, but this kind of enforcement is a shame and we discourage this."
However, he insisted that the Congress had not been pushed by force to pass the law and, although he said that the law must be implemented carefully, "I don't see anything against human rights.
"If someone was working with Qaddafi, and was part of the regime - and you know what happened in the last regime - I don't see about human rights."
Libya has become divided and unstable in the year-and-a-half since the death of Qaddafi, who ruled in an eccentric, brutal autocracy for four decades.
In his hometown of Sirte, where support for him was strongest and where many people still, quietly, feel loyalty to his regime, Mousa M Mousa, the dean of the university, said he was sure it would cause upset.
"I am sure there are a lot of people in Sirte who are worried and who would not like the law to be passed," he said. Under the new, democratic system, they are of course welcome to protest, he added.
"But in terms of the practicality of their demonstration, I don't think there will be any, because 90 per cent of Libyans are behind this law."