Renowned jihadism expert Hisham al-Hashemi was shot outside his home in Baghdad on Monday and died shortly thereafter at a local hospital, Iraqi officials told AFP.

Hashemi was an authoritative voice on Sunni jihadist factions including the Islamic State group, but was also frequently consulted by media and foreign governments on domestic Iraqi politics and Shiite armed groups.

He had warm ties with top decision-makers, including President Barham Saleh, but was also trusted by rival parties and armed groups, which used him as a mediator.

The investigator assigned to the killing told AFP that Hashemi, 47, walked out of his home in east Baghdad and was getting into his car when three gunmen on two motorcycles fired at him from metres away.

Hashemi was wounded and ducked behind his car, but the gunmen approached and shot him four times in the head at close range, the investigator said.

A medical source at the hospital confirmed to AFP that Hashemi had suffered "a hail of bullet wounds in several body parts."

"He passed away and his body is now in the hospital freezer," said Saad Maan, head of the ministry's media relations department.

Raised in Baghdad, Hashemi published several books on jihadism, then went on to work with top research centres including Chatham House in London and most recently the Center for Global Policy in Washington, D.C.

He had come out strongly in favour of the popular protests that erupted across Baghdad and Iraq's Shiite-majority south in October, which had slammed the government as corrupt, inefficient and beholden to neighbouring Iran.

More than 500 people lost their lives in protest-related violence, including several prominent activists who were gunned down in Baghdad, Basra in the south and other cities gripped by the rallies.

High-profile political killings have otherwise been rare in recent years.

But Hashemi was no stranger to threats.

Jihadism expert Hisham al-Hashemi was repeatedly shot at close range and later died of his wounds, according to Iraqi officials
Jihadism expert Hisham al-Hashemi was repeatedly shot at close range and later died of his wounds, according to Iraqi officials AFPTV / -

In September, anonymous online accounts accused him and a dozen other Iraqi activists, researchers and journalists of "collaborating with Israel."

In April, he was threatened again by anonymous Twitter users who deemed him too close to the US government.

But his killing has sent shock waves across Iraq.

From protesters and activists to foreign ambassadors and the United Nations, many were quick to mourn him.

"Cowards killed my friend and one of the brightest researchers in Iraq, Hisham al-Hashemi. I am shocked," wrote Harith Hasan, who was an academic researcher before becoming an advisor to Iraq's current premier.

Prime Minister Mustafa al-Kadhemi swore he would hold Hashemi's killers to account.

"We vow to his killers that we will pursue them so they are justly punished. We will not allow assassinations to return to Iraq for a single second," Kadhemi said in a statement.

The UN's top official in Iraq Jeanine Hennis-Plasschaert slammed the killing as a "despicable act of cowardice."

"Our heartfelt condolences to his family and loved ones. I call on the government to quickly identify the perpetrators and bring them to justice," she wrote.

And Iraq's Hashed al-Shaabi, a state-sponsored network of armed factions including many who are close to Iran, published a statement mourning Hashemi's death.

"We demand security forces follow up on this crime and catch the terrorist group that assassinated Hashemi, considered one of the most prominent writers and experts on IS terrorist groups, and who had a huge role in uncovering their secrets," it said.