This is the shocking moment an Islamic State fighter inadvertently captures his own death while recording a firefight on his body camera.

The dramatic footage shows the jihadi firing an AK-47 machine gun while frantically running between abandoned buildings in a battle with the Iraqi military.

At one point, he or a fellow insurgent can be heard screaming 'Allah Akbar!' – God is greatest.

But he commits a fatal error by stepping out from behind a wall of sandbags and is promptly shot dead by a sniper.

Watch the footage here

First-person perspective: Footage filmed on an Islamic State gunmen's body camera shows the militant engaging in a fierce firefight with the Iraqi military apparently on the outskirts of the Iraqi city of Ramadi

Dramatic: A fire rages in the background as the militant fires an AK-47 while running between buildings

Moments before he is struck by the bullet, the camera flashes towards a building where a gunman, believed to his killer, appears to be pointing his weapon directly at him.

A shot can be heard and the camera topples sideways a split second later.

The footage ends with the camera pointing towards the sun as the militant collapses on the ground and his breathing stops.

Battlefield footage obtained by fighters wearing body cameras has been an increasingly common propaganda tool on jihadi social media pages.

Fighters for Al Qaeda in the Arabian Peninsula attacked a bus and knifed a number of Yemeni army soldiers in August 2014.

Intense: The militant covers a fellow jihadi as they run along a tree line between sets of abandoned buildings

Firepower: An ISIS fighter is seen holding a rocket-propelled grenade as they take cover behind a building

A cloud of dust and smoke covers a militant as he takes cover during the firefight in the city of Ramadi

The horrific crime was filmed by the terrorists who were wearing head cameras to provide close up footage of the massacre.

Similarly the final moments of dying jihadis are regularly circulated online with the aim of promoting the idea that their death will lead them to obtain martyrdom and allow them to become green birds in paradise.

The latest video, which was published by LiveLeak, is believed to have been taken in the city of Ramadi which fell to ISIS last month in a humiliating defeat for the Iraqi government.

The capture of the provincial capital of Anbar marked the terror group's most significant advance since a US-led coalition began an air campaign against the extremists last year.

The footage emerged as gunmen in speeding cars opened fire on a vehicle transporting Iraqi Interior Ministry officials in Baghdad today, killing two officers, police and medics said.

Fatal error: The jihadi moves out from behind a wall of sandbags and is promptly shot dead by a sniper

Moments before he is struck by the bullet, the camera flashes towards a building where a gunman (pictured), believed to his killer, appears to be pointing his weapon directly at him. A shot can be heard on the video

Shocking: The footage ends with the camera pointing towards the sun as the militant collapses on the ground

There was no immediate claim of responsibility for the attack, which also wounded one person in the Baladiyat district of eastern Baghdad.

The presence of ISIS has exacerbated a sectarian conflict in the major oil producer and OPEC member with a Shi'ite-led government.

In the Abu Dsheer district in southern Baghdad, at least two people were also killed and seven wounded when a bomb exploded near a crowded market, police and medical sources said.

Efforts to contain Islamic State are currently focused on the Sunni heartland Anbar province in the west of the country and the town of Baiji in the north, near Iraq's biggest refinery.

ISIS now controls vast swathes of territory in central Iraq which is held on their behalf largely by a militia known as the Al-Anbar Lions.

Leader: Despite only being 28-years-old, Abu Wahib (centre) is the long term commander of a militia known as the Al-Anbar Lions (pictured), who control vast swathes of territory in central Iraq on behalf of ISIS

The group is led by notorious Abu Wahib who has became one of the terror group's most feared commanders.

But he has not avoided ridicule after being mocked by activists earlier this year when a photograph emerged of him wearing camouflage that made him look like a doner kebab.

The terrorist is understood to have been first drawn to terrorism while studying computer science at the University of Anbar and was arrested for links to Al Qaeda in 2006.

Abu Wahib was held by US forces at the Camp Bucca detention facility in southern Iraq until 2009, when he was sentenced to death and moved to Tikrit Central Prison in Saladin Province.