Lebanon's military says it has identified the remains of a soldier beheaded by Islamic militants.

The army said Wednesday that DNA tests confirmed the body is that of Sgt. Ali Sayid. The soldier was decapitated by militants of the Islamic State group, according to photos posted on social networks on August 28.

His body was handed over to military officials on Monday after negotiations with the militants.

Sayid disappeared from Lebanon around the time militants from Syria attacked the Lebanese border town of Arsal in early August, killing and kidnapping soldiers and police.

The militants included fighters from the Islamic State group and the al-Qaida-linked Nusra Front, and the incursion was the most serious spillover of violence into Lebanon from Syria's civil war.

Families have demonstrated throughout Lebanon demanding the captives' release.