Rival Libyan factions announced a unity government at talks backed by the United Nations, taking a tentative step to ease turmoil that has swept the country since a 2011 uprising toppled Muammar Qaddafi.

Representatives of the nation’s two dueling administrations agreed in Tunis on Tuesday to form a 32-member cabinet headed by businessman Fayez al-Sarraj, according to a statement posted on the Twitter account of the Unity Presidential Council. The deal will now have to overcome opposition in the rival parliaments based in Tripoli and the east, said Mattia Toaldo, a Libya analyst at the European Council on Foreign Relations in London.

“The second challenge is the whereabouts of this government,” he said. “If it’s not based in Tripoli, it won’t be effective.”

The UN has been trying to bring the governments and their militia allies together for months as a key step in halting chaos that fuels Europe’s refugee crisis and has allowed Islamic State to carve out a presence in the holder of Africa’s largest oil reserves. Dozens of police recruits were killed and oil facilities shelled in violence this month, underscoring the urgent need for progress.

Libya pumped about 1.6 million barrels a day of crude before the rebellion that ended Qaddafi’s 42-year rule. It’s now the smallest producer in the Organization of Petroleum Exporting Countries, generating 370,000 barrels a day in December, data compiled by Bloomberg show.

Khalifa Rajab Abdul-Sadeq was named as oil minister, while Al-Taher Serkiz will be finance minister, according to the statement.

“The government’s future path will not be easy one,” said Abdul Minim Belkour, a lawmaker in the internationally recognized legislature based in the eastern city of Tobruk. The assembly there will meet on Monday to vote on the cabinet, he said.

Before it's here, it's on the Bloomberg Terminal. LEARN MORE