But during the 21-month conflict in Syria, the web of religious and family ties and fault lines between the two countries has created new strains, especially in Tripoli. Lebanese Sunnis have increasingly supported and even joined the Sunni-led uprising against President Bashar al-Assad of Syria, who is Alawite and whose sect dominates the government. Refugees from both sects have flowed into the city.

As some Tripoli residents begin to see themselves as part of the Syrian conflict — to the dismay of the Lebanese government, which fears being dragged into the war — the intensity and frequency of fighting has increased dramatically, with clashes sometimes ignited by events in Syria. Scores have been killed here this year.

The latest conflict began after a number of Sunni fighters from northern Lebanon were killed in an ambush by pro-government forces as they tried to enter Syria to join opposition fighters. Sunnis in Tripoli, angry over videos that purported to show the men’s bodies being stabbed and kicked, attacked Alawites, starting days of clashes between militias wielding rifles and rocket-propelled grenades. Lebanese news media put the death toll at 17.