BEIRUT — Lebanese troops sealed off a town near the Syrian border after attackers ambushed an army force, killing two soldiers and wounding others, the state-run National News Agency reported Sunday.

The agency said special forces set up checkpoints on roads leading to the town, Arsal.

Troops also were deployed in fields around the town to try to prevent gunmen from escaping.

The troops were ambushed Friday while trying to detain a fugitive, Khaled Hamid, suspected of involvement in the 2011 kidnapping of seven Estonian tourists. They were abducted in Lebanon’s eastern Bekaa Valley and held for nearly four months before being released in July that year.

Some security officials have said that Hamid crossed the border into Syria over the past months to fight with rebels trying to depose Syrian President Bashar Assad. Many in Arsal, a Sunni Muslim town, are sympathetic to Syrian rebels.

Many in Lebanon fear Syria’s civil war could spill across the border.

Lebanon and Syria share a complex web of political and sectarian ties and rivalries which are easily enflamed. Lebanon, a country plagued by decades of strife, has been on edge since the uprising against Assad began in March 2011. Deadly clashes between pro and anti-Assad Lebanese groups have erupted on several occasions.

Many among Lebanon’s Sunni Muslims have backed Syria’s mainly Sunni rebel forces, in which radical Islamists have become increasingly active. Lebanese Shiite Muslims, including the militant Hezbollah, have leaned toward Assad, whose tiny Alawite sect is an offshoot of Shiite Islam.

A Lebanese army general said Sunday that “several people” have been detained on suspicion of involvement in the Friday ambush. The general spoke on condition of anonymity according to regulations.

President Michel Suleiman told the father of Capt. Pierre Bashaalani, who was killed in the ambush, that the army is determined to find all those involved and put them on trial.