Updated

Libya was plunged into deeper political turmoil today after revolutionary militiamen got their way when the country’s Congress voted to disbar from political office former Qaddafi-era officials, even if they had contributed to the overthrow of the late dictator.

Many members of the cabinet will be forced to quit – so, too, the president of the General National Congress (GNC), Mohamed Magarief, who served as an ambassador for the late Moammar Qaddafi before breaking with him.

The position of Libya’s beleaguered Prime Minister, Ali Zeidan, was unclear last night. He was for several years a Qaddafi-era diplomat, but may not fall within the provisions of the so-called political isolation. Even so, some Islamists in the GNC are pursuing a separate measure to have him sacked.

Many in the cabinet also will be forced out, including the interior minister, and so will a large number of GNC members, mostly moderates. Western diplomats warn that the measure, which was argued over for weeks and was demanded by revolutionary militiamen who have been besieging key ministries for the past week, amounts to a “legal coup” and will strengthen the Muslim Brotherhood and smaller Islamist parties.

New elections may have to be called, and the way forward is unclear.

The political turmoil won’t help the U.S. government get to the bottom of what happened in Benghazi last September when Islamist militiamen assaulted the U.S. Consulate leaving Ambassador Christopher Stevens and three other Americans dead.  With many of the ministers likely being forced out and central authority weakened the Libyan probe into the attack will be further delayed – not that it had made much progress, say government insiders.

Diplomats likened the passing of the isolation law to what has been happening in Egypt following the Arab Spring uprising there. Many of the old guard remained in power, only to be pushed out by the Muslim Brotherhood.

Earlier, Western leaders and diplomats, as well as foreign non-governmental organizations, warned Libya could be locking itself into a future of “persistent lawlessness” and weak central authority, if the GNC gave in to the demands of armed militiamen and approved the measure.

Canada’s Foreign Affairs Minister John Baird called on the Libyan government to “exercise its proper authority in ensuring stability and security for its citizens and members of the diplomatic and business communities.” He said the actions of the militiamen threatened the country’s democracy.

Hours before the vote, Human Rights Watch warned that Congress should not allow itself to be railroaded into making very bad laws because of the demands of armed men. “Libyans have a right to expect that officials who abused their positions under Qaddafi, to commit crimes or violate human rights, will be removed and never again allowed to hold public office,” said Sarah Leah Whitson, the NGO’s Middle East and North Africa director. “But this law is far too vague – potentially barring anyone who ever worked for the authorities during the four decades of Qaddafi’s rule.”

Three mornings this week the U.S. charge d'affaires in Libya, William Roebuck, slipped quietly into the Corinthia Hotel, where Zeidan keeps a private office, to hold early morning talks with the Libyan prime minister and to work out how to solve the political crisis.

The militia campaign backing the isolation law has had an Islamist flavor from the start. Graffiti spray-painted on the walls by besieged ministries declared, “No to the secular government.”

The blockades of the Foreign and Justice ministries were carefully orchestrated by the shadowy Higher Council of the Revolutionaries and began a week ago when gunmen mainly from Misrata, a key town in the rebellion that toppled Qaddafi, blocked the entrances and roads around the ministries with pick-up trucks bristling with anti-aircraft guns. They then expanded the blockade to other ministries. In March they stormed the GNC twice, as well as the prime minister’s office.

Misrata militia leaders and the Muslim Brotherhood dominate the Higher Council.

Diplomats here argue that the engineering of the political isolation law smacks of a legal coup.

“The Islamists got a drubbing in the July elections for the GNC and I think they have now snatched back the initiative by legally eliminating political rivals in the National Forces Alliance,” said a European diplomat who wished to remain anonymous. The NFA, meanwhile, secured the most party seats in the July elections and have been backing former political exiles who dominate the higher reaches of the government.

Many in the NFA worked in the Qaddafi regime before joining the rebellion.  Many of the political exiles in the government would fall foul of the political isolation law as it disbars politicians who hold dual citizenship.

Militiamen see it a different way. They argue they are “correcting the course of the revolution”, arguing that Qaddafi-era officials stole the country from the true revolutionaries by getting elected to the GNC and being appointed to ministerial roles.

“We want to isolate the people who were guiding the government of Qaddafi,” said 45-year-old Tripoli militiaman Abu Ali before the vote. “We don’t want them anymore. We want to rebuild Libya with fresh minds with people who like Libya and don’t like Qaddafi. I fought and I had so many friends who died in this revolution and now these people jump back to take our revolution, but we aren’t going to let them, we are going to win or die.”

In the days leading up to the vote, Zeidan and his ministers urged ordinary Libyans to rally behind the government and to face down the militias.

As the high-stakes drama unfolded during the week with late-night behind-the-scenes negotiations -- and militias maintaining their chokehold on the politicians with the ministry blockades -- ordinary Libyans failed to rally in any numbers that could have swung the struggle behind the government.

A demonstration in support of the government on April 4 in Tripoli’s Martyrs’ Square attracted about 200.  “I am very sad more people don’t feel this is a cause worth coming out for,” said Najwa Fitur, 48, a medical doctor, as she glanced around the square.

There were more shoppers in the capital’s nearby souk. They seemed determined to ignore a political rumpus that will have far-reaching effects on them and what kind of country Libya will become.

Bewailing the impotence of the government, politician and journalist Abdurrahman Shater said: “The militiamen have more power than the ministry of interior or the ministry of defense because they have guns and heavy armament and they have more power than the official bodies of the state. Some of them want to be in the government, some of them want to be in the embassies, some of them want to be rich. I wrote several times warning that the revolution will be stolen.”

The head of the Muslim Brotherhood’s Justice and Construction Party argues the law is necessary. “It might seem harsh,” says Nizar Kawan. “Some of the people who will have to leave assisted in the revolution, but we need a new Libya.” He compares the move to de-Nazification laws in Germany after World War II.

After the vote passed today, several thousand militiamen crowded the streets around the GNC building, chanting and dancing and holding up photographs of those who died in the rebellion against Qaddafi.