Egypt's most active militant group, Ansar Bayt Al-Maqdis, said on Thursday it had beheaded four Egyptian men for spying for Israel, accusing them of providing information that helped an Israeli drone strike kill three of the group's fighters last month.
On 20 August, decapitated bodies of four men were found by residents in the the North Sinai town of Sheikh Zuweid. Security forces had said the victims, abducted two days earlier, might have been targeted for perceived cooperation with the army and police.
The Al-Qaeda-inspired group said the four captives provided intelligence to Israel which it used in an airstrike on 23 July that killed three of its fighters in North Sinai. At the time, the Egyptian army said it had killed two extremists.
In the footage posted on Twitter, four men confessed they had been spying for Israel's Mossad spy agency before having their heads cut minutes later.
The video showed gunmen in black masks standing behind blindfolded kneeling hostages, hands cuffed behind their backs, with Al-Qaeda flags shown in the background. Towards the end of the 29-minute video, one militant reads out a statement before he goes on to cut the captives' necks. The victims are then shown dead with their severed heads placed on their backs.
Before the decapitations, the kidnapped men claimed the Israeli spy agency sought intelligence about Islamist fighters and extremists in Sinai as well as the army's movements in the underdeveloped region.
One of the men said he was behind a car bombing late in July that killed Ansar Bayt Al-Maqdis leader Khaled Al-Menei.
The group vowed that its "security apparatus will trace spies and [their] movements until they purge Jews and their collaborators from Muslim countries."
Egyptian troops in the Sinai Peninsula, adjoining Israel and the Palestinian Gaza Strip, are fighting an Islamist insurrection that has worsened since the army's ouster of Islamist president Mohamed Morsi in July 2013.
Militant attacks have mainly targeted police and troops but have also led to civilian casualties.
Ansar Bayt Al-Maqdis, or supporters of Jerusalem, urged other "spies" to repent, saying: "Our objective is not to behead you but keep you away from harming Muslims and if you refuse… by God you will be slaughtered."
The filmed killings, one of the most brutal by the group, are evocative of decapitations and executions carried out by the so-called Islamic State, whose fighters have seized great swathes of Syria and northern Iraq, raising fears that Ansar Bayt Al-Maqdis has been influenced by the group.
Egyptian security officials say they fear militants in strife-torn Libya near Egypt's border have joined forces with fighters based in Sinai.
On 19 July, gunmen killed 21 Egyptian military border guards near the frontier with Libya, in Wadi Al-Gadid governorate.
Ansar Bayt Al-Maqdis, based in Sinai and formed in the wake of the 2011 uprising, has claimed responsibility for several high-profile attacks, including downing a military helicopter early in 2014 and a failed assassination attempt on Egypt's interior minister in Cairo last year.
The group has mainly utilised booby-trap cars and hand grenades in their attacks against army and police, which it says are to avenge the killing and arrest of Islamists in a broad state crackdown following Morsi's removal.
It has also launched rockets at Israel and attacked Israeli border guards.
Last April, the United States and Egypt designated the group a terrorist organisation.