Libya: Parliament names Fathi Bashagha as interim prime minister
"The House of Representatives unanimously approved Fathi Bashagha to head the government," the parliament's spokesman Abdullah Bliheg said in a tweet on Thursday.
The decision risks sparking a new power struggle between the eastern-based assembly and Dbeibah's administration, which is based in the capital Tripoli, in western Libya.
A majority in parliament voted in favour of Bashagha, who served as interior minister between 2018 and 2020, following the withdrawal of candidate Khaled al-Bibas.
Both Bashagha and Bibas, a businessman, were shortlisted out of seven candidates nominated for the post of prime minister.
Aqila Saleh, the speaker of Libya's parliament, had announced the end of Dbeibah's term in December last year, when the Libyan elections were meant to be held. The elections have been postponed, with no new date set.
It is not yet clear if Dbeibah will accept Thursday's vote.
Dbeibah had said in a TV speech this week that he rejects any "unilateral" decision taken by parliament speaker Saleh, adding that he would step down from his position if asked by an "elected authority".
Dbeibah was installed in March as head of the UN-backed Government of National Unity (GNU) that was meant to unify the country's divided institutions and oversee the run-up to an election in December as part of a peace process.
Rival factions have been jostling for position after the election process fell apart amid disputes over the rules, including over the legitimacy of Dbeibah's own candidacy for president after he pledged not to run.
The parliament, which mostly backed eastern forces during the civil war, has declared the GNU invalid.
Saleh, who like Dbeibah and Bashagha had been a presidential candidate, has since spearheaded efforts to replace the unity government.
Assailants shot at Dbeibah's car early on Thursday in Tripoli but he escaped unharmed, a government source close to the then-prime minister said.
The source said the incident happened as Dbeibah was returning home, describing it as a clear assassination attempt, adding that the attackers fled and the incident has been referred for investigation.
Footage carried by Al Jazeera later showed what it said was Dbeibah's vehicle, which had what appeared to be a bullet mark on the windscreen and two other marks on a headlight and the chassis.
Reuters could not immediately verify the images and has not spoken to other witnesses to the incident.
Armed forces have mobilised more fighters and equipment in the capital over recent weeks, raising fears the political crisis could trigger fighting.
Libya has had little peace or stability since the 2011 Nato-backed uprising against Muammar Gaddafi. The North African country split in 2014 between warring factions in the east and west.