Ansar Bayt al-Maqdis ISrael mossad beheading
Ansar Bayt al-Maqdis gunmen beheaded four Egyptians accused of spying for Israel (Youtube)

Jihadist militants in Egypt have released a video showing the beheading of four men they accused of working for Israeli intelligence.

The footage was posted online by Sinai-based group Ansar Bayt al-Maqdis, which said it carried out the execution in retaliation for a July airstrike that killed three of its fighters.

The 27-minute video starts with images commemorating the jihadists that Ansar Bayt al-Maqdis claimed were killed by an Israeli drone in northern Sinai, near the town of Al-Arish.

Afterwards, four Egyptian men who were reportedly abducted earlier this month in the town of Sheikh Zuwaid, a few kilometres from the Gaza Strip, are seen 'confessing' to spying for Israel's intelligence agency, Mossad.

Two of the men claimed they were paid for information eventually used for the drone attack.

In the final part of the video, the four hostages are seen kneeling blind-folded in a desert area. Behind them black-clad masked gunmen stand in front of three SUVs bedecked with jihadist flags.

One of the gunmen reads a statement and then beheads the four hostages with a knife, in an act reminiscent of the execution of US journalist James Foley at the hands of fighters with the Islamic State in Syria.

Security sources told Reuters that four headless bodies were found in the Sinai Peninsula earlier this month.

The victims were said to be civilians likely to have been targeted for their perceived loyalty to the Egyptian government.

Ansar Beit al-Maqdis (Champions of Jerusalem) has been operating in the restive Sinai Peninsula since the Arab Spring uprising against Hosni Mubarak in 2011.

The group is also known to have carried out attacks against Israel. Since former army chief Abdel Fattah al-Sisi took power in Egypt, the country's police and army have been targeted.

According to Egyptian media the three Ansar Beit al-Maqdis fighters killed in July were hit by an Israeli UAV, as they were attempting to fire rockets across the border.

However, Egyptian authorities said they had carried out the strike and denied an Israeli drone had crossed into the country's airspace.

Inspired by al-Qaeda, Ansar Bayt al-Maqdis is not known to be affiliated to the Islamic State.