TRIPOLI, Lebanon (AP) -- The Lebanese army on Monday asked Islamic militants in this northern city and nearby areas to surrender as calm returned after four days of clashes that killed more than 20 people.
Lebanese troops entered the Muslim militants' stronghold of Bab Tabbaneh, the area that witnessed some of the worst clashes. The army said troops detained some of the gunmen while others fled.
A battle between Lebanese troops and Muslim militants in northern Lebanon was widely expected after members of the Islamic State group and al-Qaida's branch in Syria, the Nusra Front, launched several attacks over the past weeks in areas on the border with Syria.
Sunni militants inspired by the Nusra Front and the Islamic State group have killed and wounded several soldiers in a string of attacks in recent months in Tripoli and nearby areas.
Lebanese security officials said the fighting that began Friday killed 12 soldiers and 10 civilians, and wounded 92 soldiers and 63 civilians. The officials spoke on condition of anonymity in line with regulations.
There were no casualty figures for the militants.
The violence broke out in Tripoli two days after troops killed three militants and detained a local leader in a raid in the northern Dinniyeh region.
Lebanese troops have been subjected to a wave of attacks over the past months.
The deadliest was in August, when jihadi fighters from Syria briefly overran the Lebanese border town of Arsal, capturing some 20 policemen and soldiers and killing several others. That attack was the most serious spillover of the civil war into neighboring Syria since the uprising there began in March 2011.
Lebanon is bitterly divided over the war, with Sunnis supporting the Syrian rebels and Shiites siding with President Bashar Assad's government. The Shiite movement Hezbollah has sent fighters to support Assad's troops. Sunni militants in Lebanon have responded with attacks on Shiites as well as security forces, who they believe are dominated by Hezbollah.
In Washington, State Department spokeswoman Jen Psaki said the U.S. supports Lebanese forces fighting militants there and praised what she called a "strong stand" against the threat by Lebanese Prime Minister Tammam Salam.
"We condemn those who seek to sow chaos in Lebanon and are confident that the Lebanese people will persevere if they stand united in the face of this threat," Psaki told reporters Monday. "The army and the state security institutions alone have the legitimate role of defending Lebanon, under the direction of the government."
Associated Press writer Lara Jakes in Washington contributed to this report.