Fighting between the Lebanese army and Sunni Islamist militants in the northern Lebanese city of Tripoli died down on Monday, after three days of clashes killed nearly 20 people, including eight civilians, according to media reports. The army reportedly recaptured parts of the predominantly Sunni city it had lost to militants last week.

“The operation is over and the army is entering areas where the gunmen were entrenched in order to clear them,” Samir Jisr, a Sunni politician from Tripoli, told Reuters.

Lebanon, which has an almost equal proportion of Shias and Sunnis, has reportedly witnessed sporadic incidents of sectarian violence since the beginning of the Syrian civil war in 2011. The war has created sharp divisions in Lebanese society, with Sunnis supporting the Syrian rebels, including the al Qaeda affiliated Jabhat al-Nusra as well as the Islamic State group, while the Shias support Bashar Assad.

Sunni militant groups in Tripoli have also accused the Lebanese army of collaborating with Hezbollah, a Lebanon-based Shia militant group, against Assad's regime.

The conflict reportedly witnessed a significant escalation in August, when Sunni militants entered the town of Arsal near the Syrian border and kidnapped 20 Lebanese soldiers.

The latest clashes in Lebanon reportedly erupted on Friday, following which 19 people, including eight civilians were killed. Thousands of civilians also fled the fighting late on Sunday, according to media reports.

On Sunday, militants retreated to the Sunni dominated Bab al-Tabbaneh neighborhood in Tripoli. This area was recaptured by the Lebanese military on Monday, according to media reports.

The sectarian conflict has also been exacerbated by the influx of over one million Syrian refugees over the last three years, according to media reports.