A Syrian rebel group operating around Damascus has executed 18 alleged members of the Islamic State group in a video
mimicking the extremist organization's own macabre productions.

The video, which emerged overnight, AFP reported, shows fighters from Jaysh al-Islam (Army of Islam) wearing the orange prison clothes that ISIS victims often sport.

The ISIS prisoners however are wearing black clothes and chained together wearing ankle and hand shackles with metal balls attached.

The nearly 20-minute production mimics many aspects of ISIS's own execution videos, with similar sound effects and visuals.

Jaysh al-Islam fighters in the video say the ISIS forces are being executed in part as revenge for the deaths of at least three of the rebel group's members who were beheaded by ISIS.

The rebel group also refers to a major battle it fought with ISIS in February.

It accuses ISIS of being allied with President Bashar al-Assad's regime against its fighters and those of other Islamist rebel groups.

The video includes starkly sectarian language, accusing ISIS of betraying Sunni Muslims and allying with Shiite Muslims and "Nusayris," a derogatory terms for the Alawite sect to which Assad belongs.

It also contains lengthy "confessions" from ISIS fighters who claim that they did not fight against the Syrian army while with ISIS.

The interrogations appear intended to show that ISIS has focused its fight on other opposition forces, rather than the Syrian government.

The last part of the video shows the 18 ISIS fighters in black, kneeling before Jaysh al-Islam executioners who shoot them in the head. The shots are filmed from multiple angles and include gruesome close-ups. 

The Islamic State group emerged in Syria in 2013, when it sought to merge with Al-Qaeda's local affiliate Al-Nusra Front.

But Al-Nusra refused, and ISIS has since been at odds with the group as well as Islamist and moderate rebels. In the area around Damascus, its forces have battled Jaysh al-Islam and other rebel organizations.

Last week, a video emerged showing ISIS jihadists beheading 12 men from rival groups, among them at least three from Jaysh al-Islam and one from Al-Nusra.