Four soldiers and a police officer kidnapped in the east of Lebanon nearly a month ago have been freed by the Syrian branch of al-Qaeda.

The five "taken hostage by the al-Nusra Front have been freed and have arrived in Arsal," a Lebanese town on the border with Syria, a security service official said late on Saturday.

The national news agency (ANI) confirmed that five hostages had been released, although many other troops seized at the same time remain in the hands of different armed groups.

The official, who did not want to be named, said the men had been handed over to a religious leader who had acted as a mediator.

"They are still not in the hands of the security services," he told the AFP news agency.

The men were taken from Arsal on August 2 during a fierce battle between the Lebanese army and fighters who had crossed the border from Syria.

Three armed groups, including the al-Nusra Front and Islamic State group, are still holding 15 soldiers and 14 police officers.

The freeing of the men happened several hours after a video was released showing the beheading apparently of a Lebanese soldier by the Islamic State group, which has carried out attacks in Syria and Iraq and beheaded US journalist James Foley this month.

The Lebanese army said it was "investigating" the images.

The armed groups say they want to swap the hostages for their prisoners being held in Lebanon, although the army has demanded the immediate, and unconditional, release of the soldiers.

While the al-Nusra Front and Islamic State group share the same ideology, they are rivals on the ground in Syria.

Source: AFP