TRIPOLI, Lebanon (AP) — Gunmen loyal to opposite sides in neighboring Syria’s civil war battled in the streets of northern Lebanon on Wednesday, and the death toll from two days of fighting was at least five killed and 45 wounded, officials said.

The Lebanese army fanned out in the city of Tripoli to calm the fighting, with soldiers patrolling the streets in armored personnel carriers and manning checkpoints. Authorities closed major roads because of sniper fire.

The fighting comes at a time of deep uncertainty in Syria, with rebels closing in on President Bashar Assad’s seat of power in Damascus.

The Syria conflict has spilled over into Turkey, Israel and Jordan over the past 20 months, but Lebanon is particularly vulnerable to getting sucked in. The countries share a complex web of political and sectarian ties and rivalries that are easily enflamed. Lebanon, a country plagued by decades of strife, has been on edge since the uprising in Syria began, and deadly clashes between pro- and anti-Assad Lebanese groups have erupted on several occasions.

Tensions in Tripoli have been mounting since last week, when reports emerged that at least a dozen Lebanese Sunni fighters were killed inside Syria, apparently after they joined the rebellion against Assad.

Security officials said at least five people have been killed and 45 wounded since Tuesday. They asked that their names not be published because they are not authorized to speak publicly.

The fighting in Lebanon pits the Sunni neighborhood of Bab Tabbaneh, which supports Syria’s rebels, and the adjacent Alawite neighborhood of Jabal Mohsen, which supports Assad.

Syrian rebels are predominantly Sunni whereas Assad and his inner circle are dominated by Alawites, an offshoot of Shiite Islam.

Syria’s uprising began with peaceful protests in March 2011 and later escalated into a civil war that the opposition says has killed more than 40,000 people.

Copyright 2012 The Associated Press.