TRIPOLI (Reuters) - Libya's new Prime Minister Ahmed Maiteeq won a vote of confidence from parliament on Sunday in defiance of a renegade former army general who has challenged the assembly's legitimacy.
Maiteeq, backed by the Muslim Brotherhood, was initially elected two weeks ago after a chaotic parliamentary session that some lawmakers had rejected as illegal.
Libya's legislature is at the center of a growing standoff between rogue former general, Khalifa Haftar, with a loose alliance of anti-Islamist militias, and pro-Islamist factions positioning for influence in the North African country.
The Europe Union's special envoy on Sunday called the crisis Libya's worst since the 2011 war ousted Muammar Gaddafi, with the fragile government struggling to control brigades of former rebels and militias who are now key powerbrokers.
Lawmakers met on Sunday under heavy security to vote to approve Maiteeq's government, a week after militia forces claiming loyalty to Haftar attacked the congress to demand lawmakers hand over power.
"The congress has granted Prime Minister Ahmed Maiteeq its confidence. Out of 95 members, 83 voted in favour of his government," Abdulhamid Ismail Yarbu, an independent lawmaker told Reuters.
Another lawmaker confirmed the votes for Maiteeq, a businessman who will be Libya's third premier since March after months of unrest in the OPEC oil producer.
There was no immediate response from a spokesman to Haftar, a former Gaddafi ally who broke with the Libyan autocrat in the 1980s, sought exile in the United States and returned to help fight in the 2011 war to end his one-man rule.
Three years after a NATO-backed revolt toppled Gaddafi, Libya still has no national army, no new constitution and its parliament is caught up in infighting that has delayed the country's transition to full democracy.
Powerful rival brigades of former rebel fighters, still heavily armed with anti-aircraft cannons and armored vehicles, often make demands on the weak state. Each is loosely allied with competing Islamist and anti-Islamist political forces squaring off for control.
In March, the parliament ousted one premier, and his successor also asked to step down after his family was attacked by gunmen.
Sunday's vote took place in a former Libyan royal palace because the parliament building was closed after the attack a week ago. Tripoli military brigades stationed their armored trucks around the building and surrounding roads.
The coastal capital was calm after the vote.
Western governments are concerned Libya's instability may worsen and spill over into its North African neighbors, who are still emerging from the political unrest following the 2011 Arab Spring revolts.
The European Union's special envoy to Libya, Bernardino Leon, visiting Tripoli on Sunday urged the rival factions to work toward some consensus to overcome the "worst crisis" since the civil war to oust Gaddafi.
A week ago, Haftar started what he called a military campaign against Islamist militants in the eastern city of Benghazi. He also later claimed responsibility for the attack on parliament in Tripoli.
Several military units have allied with him, threatening to split the nascent regular forces and network of different militia whose complex allegiances often mix tribal, regional and political loyalties.
Haftar's call for a campaign against extremists has touched a nerve with many Libyans fed up of violence, especially in Benghazi where hardline Islamist groups like Ansar al-Sharia have been blamed for bombings and assassinations.
Supporters are even making comparisons to Egypt's former army chief Abdel Fattah al-Sisi, who forced the Muslim Brotherhood from power. But it is not clear how much broader militia and army support Haftar can win.
Any attempt to form a wider anti-Islamist alliance threatens to provoke a reaction from powerful rival brigades who allied with the Islamist politicians tied to the Muslim Brotherhood.
Complicating alliances, tens of thousands of former fighters are also on the government payroll in semi-official security positions with the ministries of defense and interior in a fragile bid to co-opt them.
Additional reporting by Ulf Laessing; Writing by Patrick Markey; Editing by Sophie Hares