Libya's parliament on Wednesday approved a unity government to lead the war-ravaged North African nation to December elections, a key step towards ending a decade of chaos.
Oil-rich Libya descended into conflict after leader Muammar Qadhafi was toppled and killed in a NATO-backed uprising in 2011, resulting in multiple forces vying for power.
"This will be the government of all Libyans," interim Prime Minister Abdul Hamid Dbeibah said, in a brief but emotional speech after the vote.
"Libya is one and united," he added.
After two days of intense debate in the central city of Sirte, parliament approved Dbeibah's Cabinet, with 121 of the 132 lawmakers present voting in support, the parliament spokesman said on live television.
"Thank you for your trust," Dbeibah told lawmakers. "Thank you for putting the nation's interest above all else."
The United Nations mission praised leaders for the "patriotic efforts that led to this landmark moment in the history of Libya".
But the challenges ahead are daunting.
The interim government must now tackle the many grievances of Libyans, from a dire economic crisis and soaring unemployment to crippling inflation and wretched public services.
"Libya has now a genuine opportunity to move forward towards unity, stability, prosperity, reconciliation and to restore fully its sovereignty," the UN said.
Libya has been split between the UN-recognised Government of National Accord, based in the capital Tripoli and backed by Turkey, and an administration in the east supported by military strongman Khalifa Haftar, with the backing of the United Arab Emirates, Egypt and Russia.
But a UN-supervised process aims to unite the country after a ceasefire last October, and the new government has to bring the rival administrations together.
Fayez Al Sarraj, outgoing head of the GNA, said he was "fully ready to hand over" power, while influential parliament speaker Aguila Saleh called it "a historic day".
The government's endorsement was welcomed by the United States and the European Union, who also both called the vote "historic", as well as Britain, neighbouring Egypt and France.
The US Ambassador Richard Norland said it "set the stage for elections" and offered his congratulations.
"The new unity government can count on the full support of the international community," EU Ambassador to Libya Jose Sabadell said.
"Reconciliation, improving basic services and preparing elections will be central challenges."
Lawmakers met in Sirte, a Mediterranean port city which lies halfway between Tripoli, where the western government is based, and the east, where parliament has sat in recent years.
Libyan media said the government would be sworn in on Monday in Benghazi in the east, Libya's second city and cradle of the 2011 revolution.
Foreign forces remain
Dbeibah, 61, a billionaire businessman from the western city of Misrata, was selected in February alongside an interim three-member presidency council to head the new unity administration.
The process has been marred by allegations of vote-buying, but Dbeibah defended the composition of his government.
"My first objective was to choose people with whom I would be able to work, no matter where they come from," Dbeibah said, during the debate in parliament.
Dbeibah's government includes two deputy prime ministers, 26 ministers and six ministers of state, with the key foreign affairs and justice portfolios handed to women, a first in Libya.
Another key task facing the new administration is ensuring the departure of an estimated 20,000 mercenaries and foreign fighters. Dbeibah told lawmakers they were "a stab in our back".
The premier said Tuesday he would contact the UN and the countries where the mercenaries come from to demand they withdraw.
A January 23 deadline for their withdrawal passed without any sign of them pulling them out.
Some have literally dug in. In January, satellite images broadcast by CNN showed a trench running tens of kilometres dug by "Russian mercenaries" near the frontline city of Sirte.
An advance team of a UN observer mission arrived in Libya last week tasked with monitoring the ceasefire and verifying the departure of the thousands of foreign fighters.