At least 22 Lebanese soldiers and 17 militants from the group Fatah Islam were killed Sunday as they fought in and around Tripoli in northern Lebanon, the military said.

The violence between the Lebanese army and the Fatah Islam group erupted both in the port city of Tripoli and the adjacent Nahr el-Bared Palestinian refugee camp.

It added further instability to a country already mired in its worst political crisis between the Western-backed government and Hezbollah-led opposition since the end of the 1975-90 Lebanese civil war.

The violence, the worst to hit the city in two decades, started in early morning when police raided an apartment, looking for suspects in a bank robbery that happened Saturday. The militants resisted arrest and gun battles broke out.

Afterward, the militants attacked some army posts near the refugee camp. The dozen Palestinian refugee camps scattered in Lebanon are off limits to authorities, and some are controlled by armed guerrillas.

Local TV reports indicated the fighting involved tank and grenade fire. Smoke billowed as the army trained a steady barrage of artillery and heavy machine-gun fire on militant positions inside the refugee camp.

Fatah Islam is an offshoot of the pro-Syrian Fatah Uprising, which broke from the mainstream Palestinian Fatah movement in the early 1980s and has headquarters in Syria.

Some Lebanese security officials consider Fatah Islam now to be a radical Sunni Muslim group that has ties to al-Qaeda, or at least al-Qaeda style militancy and doctrine.

Anti-Syrian government officials say they are a front for Syrian military intelligence aimed at destabilizing Lebanon.

Major Palestinian factions have dissociated themselves from Fatah Islam.

The violence underlines the difficulties facing authorities in dealing with pockets of lawlessness in a country that has long been a haven for militants.

Lebanese troops usually cordon the refugee camps with checkpoints.

On Sunday, Syria temporarily closed two border crossings with northern Lebanon because of security concerns over the clashes, Syria's interior ministry said.

The closing of all border outlets at al-Arydha and al-Daboussyah in northern Syria were meant "to preserve the security of Syrian and Lebanese inhabitants,'' the Interior Ministry said in a statement carried by Syria's official news agency, Sana.

With files from the Associated Press