Updated at 5:23 p.m. ET: Libya's national assembly on Sunday elected a former congressman and diplomat as the country's new prime minister.
Ali Zidan, who resigned as a congressman to run as a candidate in the election, won 93 votes, securing him a majority from those present in voting.
Zidan was a diplomat under Moammar Gadhafi before defecting in the 1980s and joining Libya's oldest opposition movement, National Front for the Salvation of Libya, from Geneva where he resided.
The 200-member General National Congress selected the new prime minister following last week's dismissal of Mustafa Abushagur after just 25 days in the post for failing to form a government acceptable to the national assembly. Zidan had previously run against Abushagur and lost.
Minister for local government, Mohammed Al-Harari, came in second place with 85 votes.
Zidan told a news conference he would focus on restoring security to Libya.
"The security file will be my top most priority because all the problems that Libya suffers from stems from security issues. The government will be an emergency government to solve the crises that the country is going through," he said.
Zidan, who had support from the leading liberal coalition, the National Forces Alliance, also suggested, however, that he was ready to take into account the views of the Islamist Muslim Brotherhood in his government.
"Islam is our belief system and the source for any jurisprudence, and anything against sharia is refused," he said.
Gadhafi kept Libya broadly secular, but the uprising which toppled him has paved the way for the emergence of both Islamist and more secular factions, as well as opening up tribal and regional divisions in the North African country.
The Associated Press and Reuters contributed to this report.
More world stories from NBC News:
- Assad forces using cluster bombs, rights group says
- Video: Pyramid reopens despite turmoil in Egypt
- Video: Pakistan teen shot by Taliban moves hands, feet
- Clinton reaffirms support for Libya, emerging democracies
- Madonna dedicates striptease to child activist shot by Taliban
- Western intelligence sees 'small signs of wavering' on Iran nuclear policy