The rebels, who included foreign fighters, demanded to trade soldiers and police officers it 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 90 kilometers (55 miles) from the capital, Beirut.
A Lebanese army general told The Associated Press 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.
A picture posted online allegedly showed gunmen in Arsal driving away with about a dozen men, two of them in police uniforms. The photograph corresponded to other AP reporting about the attack.
More From This Section
Gunmen killed two soldiers and wounded several others, the National News Agency reported.
"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. It added that the army "will not allow any foreign gunman to endanger the security of Lebanon or to harm its soldiers or policemen."
The Lebanese army general said earlier in the day that gunmen took two soldiers who were driving an army tanker truck. The army's later statement said the two soldiers were later freed in an army operation.