TRIPOLI - The UN mission in Libya said a ceasefire agreement was reached on Tuesday to end a week of clashes in the capital Tripoli that have killed at least 50 people.

“Under the auspices of (UN envoy Ghassan Salame), a ceasefire agreement was reached and signed today to end all hostilities, protect civilians, safeguard public and private property,” the UNSMIL mission said.

After another day of violent clashes in the capital’s southern suburbs, the fighting came to a pause in the early evening but it was unclear if all the groups involved would respect the agreement.

Last week, a ceasefire deal announced by officials from western cities only held for a few hours.

Fighting in and around Tripoli since August 27 has killed at least 50 people and wounded 138 others, most of them civilians, according to the Libyan health ministry.

The violence has also forced thousands of people to flee to nearby towns or seek shelter in other districts of the capital, while many more have remained trapped inside their homes.

UNSMIL said on Twitter that the ceasefire agreement also provides for the reopening of Mitiga airport, the capital’s only functioning airport that has been closed since August 31 due to the clashes.

The agreement “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 these issues,” it added.

The UN mission said among those who took part in the closed-door talks were military officers and leaders of various armed groups present in and around the capital.

Representatives of the UN-backed Government of National Accord (GNA) including the interior minister also attended the talks.

The fighting has pitted armed groups from Tarhuna and Misrata against each other, even though they are both supposed to be under the control of the GNA.

The Libyan capital has been at the centre of a battle for influence between armed groups since the fall of dictator Moamer Kadhafi in 2011.