Libya's ambassador to the United Nations has warned of "full-blown civil war" if the chaos and division in the North African country continue.
Ambassador Ibrahim Dabbashi told the UN Security Council on Wednesday that he had always excluded civil war as a possibility "but the situation has changed."
"The situation in Libya is complicated," Dabbashi told the council.
"Yet the situation since the 13th of July has become even more complicated and the situation might unravel into a full-blown civil war if we're not very careful and wise in our actions."
Libya has been sliding deeper into chaos over the past weeks, with factions now backing rival prime ministers and assemblies, while the US says Egypt and the United Arab Emirates have carried out airstrikes against armed groups, a charge Cairo denies.
Fighters who want to bring in Islamic law seized Tripoli airport at the weekend, compounding the crisis in Libya that has been boiling since the fall of long-time leader Muammar Gaddafi in 2011.
UN mission chief in Libya Tarek Mitri told the council that the clashes in recent days "have been unprecedented in their gravity and to be sure, very alarming".
Libya currently has two rival parliaments in different parts of the country, and two different governments, after the outgoing parliament reconvened and appointed a new prime minister.
The UN Security Council has moved to impose sanctions on militias and their political supporters who are fuelling Libya's escalating war.
In a resolution adopted unanimously on Wednesday, the 15-member council also tightened an arms embargo and asked experts to draw up a list of names of Libyans targeted for sanctions.
Mitri, who is wrapping up his mandate as UN envoy to Libya, said there had been unprecedented waves of Libyans fleeing fighting in Tripoli, with some 100,000 displaced within the country and another 150,000 fleeing abroad, including migrant workers.
He warned of "mounting danger in Libya and beyond" given the government's "very limited capacity" to restore order and tackle the threat from heavily-armed militias.
In its resolution, the council expressed "its determination to use targeted sanctions in pursuit of stability in Libya and against those individuals and entities who threaten its stability and obstruct or undermine its successful completion of the political transition".
It singled out human rights violations, attacks on Libyan ports, foreign missions and government buildings as well as the illegal export of crude oil to support the rebels as actions that could be punished with sanctions.
The measure allows for an asset freeze, travel ban and arms embargo on individuals and groups that are blacklisted.
The Libyan ambassador described the resolution as a "milestone that sends a very clear message to the parties to the conflict" but said more needs to be done to bring Libya back from the brink.
The council encouraged Arab countries and other nations to support an end to fighting and push the sides towards dialogue.
Asked about the Egypt-UAE airstrikes on Libya, UN spokesman Stephane Dujarric on Tuesday said the military intervention aimed at blocking the Islamist advance was unhelpful.
"We do believe that outside actors should refrain from intervening or supporting any of the armed actors involved in the fighting in Libya," he said.