Libyan negotiators holding talks in Geneva have agreed to work toward forming a national unity government for their shattered nation, the U.N. mission to the North African country announced on Friday.

However, the development fell short of making significant progress toward stability in Libya since representatives of one of the main rival groups — the Islamist-dominated parliament in the capital of Tripoli and the militias backing it — were absent from the talks in Switzerland.

Libya has been mired in its worst fighting since Moammar Gadhafi's regime was overthrown in 2011. Two rival governments are each backed by an array of militias that have effectively split the nation.

One government is based in Tripoli and supported by Islamist parties and powerful militias from the western city of Misrata. The second Cabinet has been chosen by Libya's elected parliament, which is internationally recognized but which was forced to relocate at gunpoint to the far eastern city of Tobruk where it now holds sessions.

The fighting and violence has displaced hundreds of thousands of civilians, left hundreds killed and thousands wounded. Most foreign diplomats fled the country and shut their embassies last year.

The talks hosted by the United Nations are aimed at reaching a ceasefire and laying the groundwork for a practical road map to end the conflict.

Lawlessness and a proliferation of weapons have turned Libya into a magnet for Islamic extremists, including affiliates to the Islamic State group and al-Qaida.

On Friday, the U.N. mission to Libya said it concluded two days of talks in Geneva with Libyan representatives, during which the participants also agreed on pulling out all armed groups from Libyan cities.

The U.N. mission said the participants discussed "confidence-building measures," including the release of detainees from both sides, opening closed ports and securing safe freedom of movement around the country.

The talks were attended by representatives from the Tobruk-based parliament and some from the western cities of Misrata and Gharyan who support a peaceful resolution. Representatives from the Tripoli-based parliament and major militias backing it were absent.

U.N. Envoy to Libya Bernardino Leon, who is leading the peace efforts, said earlier this week that the Geneva talks are just the start of a long process.

A statement from Libya Dawn — an alliance of Misrata militias backed by Islamist parties that overtook Tripoli last year — rejected the U.N. talks.

"We call upon all revolutionaries in the battle grounds ... to cut the way in front of Leon and his plots," said a statement on Libya Dawn's Facebook page. Libya Dawn said it would host a separate initiative, where those who boycotted Geneva and other rival groups will be invited to attend.

The conflict has engulfed several Libyan cities and set oil tanks ablaze at a crucial distribution terminal, endangering Libya's primary source of national income.

On Thursday, the Central Bank urged serious spending cuts in the face of a large budget deficit. It called for slashes in spending on diplomatic missions and government scholarships, along with a review of food subsidies and public salaries in order to shrink a budget deficit estimated at $19 billion.