A ceasefire has been reached between armed factions fighting over the Libyan capital for more than a week, the United Nations said on Tuesday, but it was unclear how it would be implemented.
Dozens of people have been killed in fighting engulfing Tripoli as rival armed groups vie for power and money in the chaos persisting in the oil producer since the toppling of Moammar Gadhafi in 2011.
"A ceasefire agreement was reached + signed today to end all hostilities, protect civilians, safeguard public and private property," the U.N. mission in Libya [UNSMIL] said on Twitter.
The Tripoli Matiga airport - closed since Friday - would also be reopened under the deal, the United Nations said, showing pictures of the meeting hosted by U.N. Special Envoy Ghassan Salame but giving no immediate details.
It was not clear how the ceasefire would be implemented as militias have ignored previous calls to lay down arms by the U.N.-backed government which is largely powerless.
There is no police or army or functioning state to enforce peace in a country ruled by armed groups who defy authority and form flexible alliances.
"Today does not aim to fix all the Libyan capital's security problems; it seeks to agree on a broader framework on the way to start addressing the issues," UNSMIL quoted Salame as saying.
In a sign of the chaos, hundreds of African migrants escaped from a detention center in Tripoli as the fighting between rival groups raged nearby, an aid official said.
A video posted on social media on Tuesday purportedly showed hundreds of Africans, some carrying plastic bags, walking in a long line away from the detention centre. It is located on the road to the former Tripoli International Airport, which was destroyed in a battle between rival militias in 2014.
Libya is a major departure point in North Africa for migrants crossing the Mediterranean Sea to Europe, mainly from other parts of Africa.
The aid official, who works for an international organisation, said as many as 1,800 migrants might have escaped the facility on Tuesday. It was unclear where they had gone.
If confirmed, this would mean that almost a quarter of Libya's jailed migrants, mostly Africans, are on the run. Most had been jailed after the Libyan coastguard intercepted their makeshift boats bound for Italy.
Tripoli is formally controlled by the internationally recognized Government of National Accord, but armed groups working with it act with autonomy. Eastern Libya is controlled by a rival administration.
Last Thursday U.N. agencies and authorities relocated hundreds of migrants from government-run detention centers in southern Tripoli to safer locations.
In a further sign of chaos, some 400 prisoners also escaped on Sunday from a jail in southern Tripoli, forcing open the doors as the guards retreated.
More than 1,800 families have been displaced from their homes since the start of the fighting, a report by the Tripoli-based ministry for displaced people said.