The agreement was signed by representatives of the capital and the town of Tarhuna, southeast of Tripoli, the interior ministry said in a statement.
Survivors report 220 migrants drowned off Libya in recent days: UNHCR
The deal ratified by interior minister Abdessalem Ashour calls for the rivals to implement a UN-brokered accord, signed on September 4, to form a joint security force of police from Tripoli and Tarhuna to patrol the capital's southern suburbs.
The Government of National Accord (GNA), in a statement, welcomed the halt to fighting that already took effect on Tuesday.
The clashes which erupted on the capital's southern outskirts on August 26 have left at least 117 dead and more than 400 injured, according to a fresh casualty toll issued by the GNA.
Three babies dead, 100 missing in shipwreck off Libya
More than 25,000 people have been displaced by the violence.
The Libyan capital has been at the centre of a battle for influence between armed groups ever since dictator Muammar Gaddafi was ousted and killed in a NATO-backed uprising in 2011.
The latest feud has pitted armed groups from Tarhuna and Libya's third city Misrata against militia forces from Tripoli under the nominal control of the GNA.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ