TRIPOLI — The United Nations and European states on Sunday welcomed a UN peace deal initialed by some Libyan factions but not by the opposition as a step towards restoring stability there.

Plunged into chaos since the 2011 overthrow of dictator Moammar Gadhafi, Libya has two parliaments and governments vying for power, as a slew of armed groups battle for control of its oil wealth.

The elected parliament which initialed Saturday's agreement in Morocco, along with some members of political parties and civil society and local officials, is based in the eastern city of Tobruk.

The rival General National Congress (GNC) is based in Tripoli and was set up by a militia alliance, including Islamists, known as Fajr Libya, after it seized the capital last August.

The two sides have been locked in months of thorny negotiations brokered by UN envoy Bernardino Leon who has struggled to clinch a deal on a national unity government and hold fresh polls.

The GNC boycotted Saturday's ceremony in the Moroccan resort of Skhirat, saying Leon's draft deal was not "satisfactory" and calling for "modifications."

Nevertheless, UN Secretary General Ban Ki-moon was "encouraged" by the initialing of the accord, a UN statement said.

"He looks forward to the speedy conclusion of the full agreement and its implementation," a spokesman for the UN chief said.

× Fear of missing out? Sign up for the Early Bird Brief, the defense industry's most comprehensive news and information, straight to your inbox. Thanks for signing up. By giving us your email, you are opting in to the Early Bird Brief.

"This act is a clear demonstration of political will and courage and brings the country one step closer to resolving the current institutional and security crisis."

An 'Important Step'

Ban urged "all Libyans" to move the transition process forward by forming a national unity government.

The UN Security Council has urged Libyan factions to sign on to Leon's proposals in a bid to stem rising violence and the spread of radical organizations such as the Islamic State group.

The jihadists have taken advantage of Libya's divisions to establish itself in the country, close to Europe's shores.

Italy and the European Union also welcomed the agreement as a step toward restoring peace.

Italian Prime Minister Matteo Renzi tweeted that it was an "important step in efforts to stabilize the region and re-establish peace in this great country."

Renzi said a solution to the conflict in Libya was "central" to battling "terrorism and (illegal) immigration."

Italy has repeatedly said an accord would help stem the flow of migration to Europe from Africa via Libya — where people smugglers have stepped up their lucrative business.

The International Organization for Migration said Friday that some 150,000 migrants have crossed the Mediterranean to Europe so far this year, with nearly all landing in Italy.

EU foreign policy chief Federica Mogherini welcomed Saturday's deal as "an important step towards restoring peace and stability in Libya" and urged the GNC to initial it as well.

The Tobruk government, recognized internationally, has welcomed what it called a "huge breakthrough", urging all Libyan parties to overcome their differences and finalize the deal.

'Door Remains Open'

"What happened in Morocco is positive," said political activist Othman al-Sassi, stressing that Libya needs a national unity government.

"The Congress was not present but other parties to the Libyan conflict initialed the political agreement and that is a breakthrough," said Sassi, himself a former GNC member.

Leon told Saturday's ceremony in Morocco the door to further negotiations would remain open, expressing confidence that the GNC will return to the talks.

"This is one but a very important step on the road to peace ... a peace, which all Libyans have been long seeking to achieve," he said.

"The door remains open for those who chose not to be here today... I am confident that in the weeks ahead we will try to clarify the issues that remain contentious," he added.

The deal initialed on Saturday was the fourth draft Leon had proposed.

It consists of six points aimed at "laying the foundation for a modern, democratic state based on the principle of inclusion, the rule of law, separation of powers and respect for human rights", Leon said.