Tripoli - A ceasefire went into force early on Saturday in the Libyan capital after two days of fighting between rival gunmen injured nine people and forced residents to cower indoors, the government said.The fighting between two rival armed groups in eastern Tripoli erupted on Thursday after one accused the other of kidnapping four of its members, the Tripoli-based news agency LANA reported.It said families trapped in the conflict zone of Abu Slim appealed to the authorities to intervene to halt the violence which closed down the city centre.The UN-backed Government of National Accord (GNA) said it had successfully brokered a ceasefire between the two groups, with help from town elders from Tarhuna and Gharian south of Tripoli.An agreement has been reached to set up three committees to follow up on the accord, the GNA said in a statement released overnight.One committee will be tasked with enforcing the ceasefire, another consisting of health ministry officials will follow up the condition of those wounded and the third will assess damage, the statement said.The Libyan Red Crescent on Friday said nine people had been injured in the fighting. There was no official casualty toll.LANA said the fighting with heavy weapons in the centre of Tripoli erupted on Thursday and raged throughout the day. A truce was reached, but quickly collapsed and clashes continued on Friday.Residents caught in the crossfire said their homes were shaken by the sound of exploding rockets, as columns of smoke rose from the zone of fighting while tanks and trucks mounted with heavy anti-aircraft guns moved in the zone."Two apartments in housing blocks on the airport road were hit by rockets. I can see columns of smoke," local resident Nuria al-Mosbahi told AFP on Friday.A convoy carrying GNA chief Fayez al-Sarraj came under heavy gunfire near the Abu Slim sector on Monday, but he and other top officials with him survived unharmed.Libya has been submerged in chaos since the fall and killing of longtime dictator Moammar Gaddafi in a NATO-backed 2011 armed uprising.Sarraj's fragile GNA, formed under a UN-backed deal signed in late 2015, has struggled to impose its authority, particularly in eastern Libya where a rival administration holds sway.UN envoy Martin Kobler has deplored the fighting and called, in an online statement, for "calm, dialogue and the protection of civilians".