Lebanese soldiers trade fire with Islamist gunmen around the border town of Arsal, attempting to push out Syria-linked militants. (Reuters)

Lebanese soldiers trade fire with Islamist gunmen around the border town of Arsal, attempting to push out Syria-linked militants. (Reuters)

Rebels fighting in Syria’s civil war crossed into Lebanon and raided a border town Saturday, killing and capturing security force members in the most serious incursion into the tiny country during its neighbor’s three-year-long conflict.

The rebels, who included foreign fighters, demanded to trade soldiers and police officers captured in Arsal for some of the “most dangerous detainees,” the Lebanese army said in a statement. Masked gunmen roamed the streets as Lebanese helicopter gunships flew over the town, about 55 miles from the capital, Beirut.

A Lebanese army general said that the gunmen attacked army positions near Arsal and troops returned fire. Another official said the gunmen also took control of the main police station in the town.

Lebanon’s state-run National News Agency reported that Arsal residents later freed police officers at the station, although rebels captured some weapons and released several detainees. It said gunmen killed two residents near the police station.

Gunmen killed two soldiers and wounded several others, the National News Agency reported.

Smoke billows from Arsal, a Sunni Muslim town near the Syrian border in eastern Lebanon, Saturday, Aug 2, 2014. Rebels fighting in Syria’s civil war crossed into Lebanon and raided a border town Saturday, killing and capturing security force members in the most serious incursion into the tiny country during its neighbor’s 3-year-old conflict. (Uncredited/AP)

“What is happening today is among the most dangerous of what Lebanon and the Lebanese are being subjected to,” the army statement said. “The gunmen kidnapped several soldiers and policemen who were spending the weekend with their families . . . and demanded the release of some of the most dangerous detainees held by the army.”

The statement said the Lebanese army “will not allow any side to move the battle from Syria” into Lebanon.

The general and the official spoke on condition of anonymity as they were not authorized to speak publicly.

Prime Minister Tammam Salam described the attack as a “flagrant aggression against the state of Lebanon” and vowed that his government “will deal with the developments with extreme firmness and strength.”

Saturday’s attacks came hours after the army said troops detained a Syrian citizen named Imad Ahmad Jomaa, who identified himself as a member of Syria’s al-Qaeda-linked Nusra Front. The National News Agency said Jomaa was detained as he was being brought to a hospital in Lebanon after being wounded while fighting Syrian troops.

Arsal is home to tens of thousands of Syrian refugees and rebels enjoy wide support among its population. Lebanese Sunnis, such as the residents of Arsal, often back the Sunni rebels fighting against Syrian President Bashar al-Assad. Shiites, such as those belonging to Lebanon’s Hezbollah militant group, typically back Assad.

Syria’s civil war has spilled over into Lebanon on multiple occasions and inflamed sectarian tensions leaving scores dead. However, previous rebel raids never went so deeply into Lebanese territory.