Libya's parliament passed a law on Sunday that bans officials who held senior positions under ousted dictator Muammar Qaddafi from holding high-level government posts, a move that could disqualify much of the country's political elite from office.

The bill, dubbed the "Political Isolation Law," has been a source of contention for months. Militias, some of which have roots in the rebel groups that fought Qaddafi, have besieged government offices in Tripoli to pressure parliament to adopt an expansive version of the law. Rights groups counter that its language is too vague and contradicts core principles in the country's provisional constitution.

Several drafts have circulated and a text of the final law was not immediately available. Depending on how it is worded, it could effectively dismiss many of Libya's current leaders — including the prime minister — for having served under Qaddafi's more than 40-year rule, regardless of their role during the 2011 uprising that overthrew him.

The General National Congress, Libya's elected parliament, voted overwhelmingly in favor of the law. Out of 200 lawmakers, 169 attended the vote.

Notably absent from the voting was the head of Congress, Mohammed al-Megarif, who may be ousted under the new law.

Prime Minister Ali Zidan, who served as a diplomat under Qaddafi, may also be among those affected.

Parliamentary spokesman Omar Humeidan said after a live broadcast of the vote that a committee will be formed to see how the new law affects current senior officials.

The law could also affect a number of ambassadors, heads of governmental agencies and companies, as well as a number of elected lawmakers, among others.

The New York-based Human Rights Watch said that while Libyans have a right to see officials who abused their positions under Qaddafi or committed crimes be removed from office, the law is too sweeping.

"This law is far too vague - potentially barring anyone who ever worked for the authorities during the four decades of Qaddafi's rule," Sarah Leah Whitson of HRW said in a Saturday statement.