TRIPOLI, Lebanon (Reuters) - At least 22 people were wounded in overnight clashes between Sunni Muslims and Alawites in Lebanon's northern city of Tripoli in another spillover from the war in neighboring Syria, security and medical sources said on Tuesday.

Gunmen in the Sunni district of Bab al-Tabbaneh and their Alawite rivals in Jebel Mohsen exchanged gun and grenade fire in sporadic fighting through the night, despite the presence of Lebanese army troops in the port city, residents said.

An army statement said soldiers raided buildings used by gunmen and "retaliated swiftly against sources of gunfire". It said five soldiers were wounded on Monday evening and another five, including an officer, were hurt on Tuesday by a hand grenade lobbed at an army base.

Medical and security sources said at least 12 civilians or gunmen had been wounded. Some put the figure as high as 25.

Chronic Sunni-Alawite tensions in Tripoli have been heightened by the 17-month-old, mainly Sunni uprising in Syria against President Bashar al-Assad, an Alawite.

Violence has flared several times and 15 people were killed in early June in the worst clashes between the Bab al-Tabbaneh and Jebel Mohsen districts.

(Reporting by Nazih Siddiq; Editing by Alistair Lyon)