* Sign of dysfunctional politics in post-Gaddafi Libya
* Gunmen pushed adoption of ban on Gaddafi-era officials
The head of Libya's national assembly is set to resign on Tuesday, sources close to him said, following passage of a law banning anyone who held a senior post under the late Muammar Gaddafi from government.
The legislation was adopted at the demand of armed factions who helped end Gaddafi's 42-year rule in 2011 but critics and diplomats fear it could strip government of experienced leaders, further complicating the transition to an orderly democracy.
Armed violence and lawlessness caused in part by militia groups who often do as they please has hobbled governance in wide areas of the oil-producing North African state.
An adviser to General National Congress president Mohammed Magarief said he was expected to announce his resignation in a speech to the body on Tuesday.
The adviser did not elaborate. A spokesman for Magarief confirmed only that he would speak to the congress.
The move would come as no surprise given the assembly's passage on May 5 of legislation banning officials who served under Gaddafi from September 1969 - when he seized power in a coup - and the fall of his regime in October 2011.
Although Magarief, an economist, served as ambassador to India under Gaddafi, he lived in exile from the 1980s and became a leading figure in Libya's oldest opposition movement, the National Front for the Salvation of Libya.
Born in 1940 in eastern Libya, where the 2011 uprising broke out, Magarief was elected head of the National Congress after Libya's first free elections for decades last July.
The new law, which comes into effect on June 5, does not make provisions for those Libyans who spent decades in exile and actually became instrumental in toppling Gaddafi.
Congress members say the law - which could unseat other top politicians - could be applied to more than 20 people in the congress of around 200 members.
Politicians debated it for months but the issue came to a head when armed groups took control of two ministries in late April and stormed institutions including the state broadcaster, demanding immediate enactment of the legislation.
Diplomats in Tripoli said that holding the vote under duress undermined its legitimacy.