The United Nations said Tuesday that a ceasefire agreement had been reached between rival militias in the Libyan capital Tripoli.
The UN Support Mission in Libya thanked the parties and congratulated them.
"The parties agree to seek a peaceful resolution to the crisis, particularly a cessation of hostilities and an appropriate monitoring mechanism. If the various parties demonstrate genuine and full respect for the commitments, further dialogue will be established by the United Nations and will be dedicated to discussing the appropriate security arrangements in the capital," the agreement said.
The parties agreed to cease all hostilities, halt any further hostile movement that would hamper implementation of the ceasefire, ensure civilians are not put at risk and human rights are respected as stipulated by national and international laws and protect all private and public properties.
Last Sunday, Libya's UN-backed unity government declared a state of emergency in the capital and its outskirts over the clashes between rival militias.
The decision came after 38 people were killed in violence that broke out between militias aligned with the UN-backed unity government in southeastern Tripoli on Aug. 26.
Several Western governments also published a written statement on the efforts to bring the violence in Tripoli to an end.
"The governments of France, Italy, the United Kingdom, and the United States welcome the result of the mediation reached today in Tripoli by the United Nations Support Mission that aims to deescalate violence in and around Tripoli and ensure the protection of civilians," it said.
"We reiterate our strong support for Special Representative of the Secretary-General Ghassan Salame as he works to realize an immediate and durable cessation of hostilities in the Libyan capital, which is a critical step to advancing the political process in accordance with the United Nations Action Plan."
Libya has been dogged by turmoil since 2011 when a bloody NATO-backed uprising led to the death of strongman Muammar Gaddafi after more than four decades in power.
Since then, Libya’s stark political divisions have yielded two rival seats of power -- one in Tobruk and another in Tripoli -- and a host of heavily-armed militia groups.