Libya faced the challenge of two prime ministers Thursday after parliament named a rival to the existing unity government's chief Abdulhamid Dbeibah, hours after his convoy was targeted in a drive-by shooting.

The appointment of a second prime minister threatens to spark a new power struggle in the war-torn nation.

The House of Representatives, based in Libya's east, "unanimously approved" former interior minister Fathi Bashagha "to head the government," the parliament's spokesman Abdullah Bliheg said.

A file picture shows former Libyan interior minister Fathi Bashagha, who has been appointed prime minister by the country's eastern-based parliament
A file picture shows former Libyan interior minister Fathi Bashagha, who has been appointed prime minister by the country's eastern-based parliament AFP / Abdullah DOMA

On Thursday evening Bashagha flew to Tripoli from the eastern city of Tobruk, promising "to open a new chapter" and "reach out to everyone."

Thanking Dbeibah for his work, the former fighter pilot said on his arrival at Mitiga airport that he was "confident" that the government would "respect democratic principles" and hand over power.

The move is expected to deepen rivalries between the eastern assembly and Dbeibah's western-based administration in the capital Tripoli, where experts warned of potential violence.

Libya's Abdulhamid Dbeibah, shown on November 21, 2021
Libya's Abdulhamid Dbeibah, shown on November 21, 2021 AFP / Mahmud TURKIA

Dbeibah, a construction tycoon appointed a year ago as part of United Nations-led peace efforts, has vowed he would "accept no new transitional phase or parallel authority" and would only hand over power to an elected government.

The UN will continue to recognise his administration, UN spokesman Stephane Dujarric said Thursday.

The vote came hours after Dbeibah's convoy was targeted in a drive-by shooting in Tripoli, but which caused no casualties.

Map of Libya
Map of Libya AFP / Aude GENET

"Dbeibah is refusing to step down, so there is potential for some kind of conflict in Tripoli and beyond," Amanda Kadlec, a former member of the UN Panel of Experts on Libya, told AFP. "It could get ugly really fast".

Libya's Abdulhamid Dbeibah, shown on November 21, 2021
Libya's Abdulhamid Dbeibah, shown on November 21, 2021 AFP / Mahmud TURKIA

Dbeibah's administration had a mandate to lead the country to elections last December 24, but the polls were cancelled amid bitter divisions over their legal basis and the candidacies of several controversial figures.

Parliament speaker Aguila Saleh, who like Dbeibah and Bashagha had been a presidential candidate, has since spearheaded efforts to replace the unity government.

The assembly in the eastern port of Tobruk had considered seven candidates to lead the administration.

As politicians jostle for power, life goes on; here Libyan children ready for a rollerblading race at the seaside promenade in Tripoli on February 10
As politicians jostle for power, life goes on; here Libyan children ready for a rollerblading race at the seaside promenade in Tripoli on February 10 AFP / Mahmud TURKIA

But shortly before Thursday's confirmation vote, Saleh announced that Bashagha's only remaining challenger, former interior ministry official Khaled al-Bibass, had withdrawn from the race.

The live television feed cut just before the vote took place.

Libya has seen a decade of conflict since the 2011 revolt that toppled dictator Moamer Kadhafi, leaving a patchwork of militias vying for control over an oil-rich country riven by regional divisions.

Experts warned that Thursday's vote threatens a repeat of a 2014 schism which saw two parallel governments emerge.

"Libya has two prime ministers. Again. Groundhog Day," Anas El Gomati of Libyan think tank the Sadeq Institute wrote in a tweet.

The 2014 crisis had seen a UN-backed unity government face off against the parliament, which is backed by eastern military chief Khalifa Haftar -- another candidate in the elections set for December.

Before the December polls were scrapped, Bashagha had travelled to meet Haftar, whose self-proclaimed Libyan Arab Armed Forces said Thursday it backed the decision of parliament.

Bashagha and Dbeibah, both from the powerful western city of Misrata, have the support of rival armed groups in the Libyan capital and the surroundings.

"Bashagha and Dbeibah both have deep connections across western Libya, and the militias will move with whomever they see as having power," Kadlec said.

"The Tripoli militias might also take a wait-and-see approach. Alliance-hopping is part of the playbook in Libya," she added.

The UN, Western powers and even some members of parliament have called for Dbeibah to stay in his role until elections, for which a new date has not yet been set.

Peter Millett, a former British ambassador to Libya, said the main division now was "between the Libyan people -- who want elections -- and the political elite, who don't."

"The motivation of many MPs is to hang on to jobs and privileges rather than allow for a smooth process leading to elections," he said.

"This seems like a decision taken to deprive the people of the right to vote by delaying elections even further and causing potential instability in Tripoli."