Tripoli - Ahmed Miitig, a businessman backed by Islamists, was named Libya's new prime minister on Sunday after winning a vote in parliament, a parliamentary official announced.
After a chaotic session of the General National Congress (GNC), Miitig was initially reported to have mustered only 113 votes of 120 votes needed under the constitution in a vote of confidence.
But GNC official Salah al-Makhzoum later said Miitig had in fact clinched 121 votes in the 185-seat interim parliament, apparently after a recount, after beating off challenger Omar al-Hassi, a university professor.
It was the second time in a week that the GNC, Libya's top political authority, met to decide between the two candidates who were initially among a group of seven hopefuls.
Parliament gathered last Tuesday when Miitig won 67 votes in a first round ahead of Hassi with 34 votes.
A second round of voting was interrupted by gunmen who stormed into parliament, shooting and forcing deputies to evacuate the premises.
The GNC has been struggling to choose a prime minister to tackle growing lawlessness in the North African nation.
Parliament ousted former premier Ali Zeidan in March over his failure to rein in violence that has escalated since a 2011 uprising that toppled and killed veteran dictator Muammar Gaddafi.