Libya's General National Congress (GNC) elected Ali Zeidan, a long-time opponent of deposed dictator Moamer Kadhafi, as prime minister on Sunday, the assembly's chief said.
"Ali Zeidan is elected prime minister and is asked to propose a cabinet within two weeks," Mohammed Megaryef, president of the national assembly, said in remarks broadcast on television.
Benefitting from the backing of the liberal coalition in the 200-seat assembly, Zeidan won 93 of the votes cast, trumping the 85 garnered by the only other candidate, local government minister Mohammed al-Hrari.
The GNC must approve the government team proposed by Zeidan in order for him to assume office. If his cabinet is accepted, Zeidan will take over from Abdel Rahim al-Kib, who has held the post since November 2011.
Outlining his programme at the assembly on Sunday, Zeidan said that forming a professional army and police force was his "highest priority", in a nod to anti-militia protesters who have been calling for professional security forces.
He proposed an "intensive training and recruitment campaign to boost the ranks of army and police" by integrating new members who can replace officers from the previous regime.
Zeidan, 62, also cited transitional justice and national reconciliation as top priorities at a time when mounting intercommunal tensions, especially between rival cities Misrata and Bani Walid, risk plunging Libya into civil war.
The liberal National Forces Alliance (NFA), the largest political bloc in the assembly, rallied behind Zeidan, who had been elected to the legislative body on an independent ticket.
He had to give up his seat to run for the post of premier.
Signup to our newsletter and follow us on Facebook and Twitter!
A former career diplomat, Zeidan defected in 1980 while he was serving at the Libyan embassy in India, and spent the next three decades in exile.
He was a member of the opposition National Front for the Salvation of Libya, established in 1981 by dissidents abroad, before becoming a Geneva-based advocate for human rights in Libya.
The NFA holds 39 of the 80 seats reserved for parties in the assembly. It is headed by Mahmud Jibril, one of the architects of the 2011 revolt that toppled Kadhafi's regime.
Zeidan, like Jibril, played a major role in winning international recognition for the political leadership of rebels who fought Kadhafi's forces after a popular uprising escalated into civil war.
Defeated Hrari, a 56-year-old academic, is said to have had supporters in the Justice and Construction Party, which was launched by the Muslim Brotherhood and represents the second largest force in the assembly with 17 seats.
The remaining seats in the assembly are held by smaller parties and 120 independent candidates of mixed ideological and political convictions.
The difficulty of forming a government that satisfies key parties and players crystallised last week when the assembly rejected a "crisis" cabinet proposed by elected prime minister Mustafa Abu Shagur and dismissed him.
Abu Shagur said the two largest political blocs turned against him because he would not cave into their demands for a raft of ministries.
The newly elected prime minister faces many challenges in a country still awash with arms and struggling for reconciliation nearly a year after Kadhafi's ouster and death.