A founding member of Hamas has died three weeks after he accidentally shot himself in the head while cleaning his weapon, a spokesman for the group said.

Imad al-Alami had been unconscious since the shooting at his home in Gaza City on January 9, Hamas spokesman Hazem Qassem said on Tuesday.

Hamas had initially hastily announced al-Alami died naturally but later said he shot himself while checking his weapon.

He was visited in hospital by Hamas leader Ismail Haniya, Gaza chief Yahya Sinwar and his deputy Khalil al-Hayya shortly after the shooting.

Founding member of Hamas Imad al-Alami (pictured being carried during his funeral) has died three weeks after accidentally shooting himself in the head while cleaning his weapon

Top Hamas leader Sheikh Ismaeil Haneiya and others carry the body of Hamas senior leader al-Alami with others in al-Omari mosque during his funeral in Gaza City on Tuesday

Al-Alami has for decades been a senior member of Hamas, which runs the Gaza Strip. Israel has accused him of planning multiple attacks.

The 62-year-old held several key posts as a member of Hamas' policy-making bod.

In 2003 the United States declared him and five other Hamas leaders 'specially designated global terrorists'.

He lived in exile in Syria for more than 20 years but returned to Gaza in 2012.

Hamas had initially hastily announced al-Alami died naturally but later said he shot himself while checking his weapon and was in critical condition

Hamas leader Ismail Haniya arrives to visit Imad al-Alami at the Al-Shifa hospital in Gaza City, after he was hospitalised in critical condition on January 9

He remained a prominent official though not a member of the current politburo.

After the 2014 Israel-Hamas war, he traveled to Turkey for treatment for an injury in which he lost a leg. Hamas said he was wounded in the war.

Israel has previously assassinated senior Hamas leaders, including the group's wheelchair-bound founder Ahmed Yassin.

He lived in exile in Syria for more than 20 years but returned to Gaza in 2012. The 62-year-old held several key posts as a member of Hamas' policy-making body

However, radical Islamist groups have targeted Hamas, with an Islamic State affiliate recently calling for attacks against them.

In October 2017, the head of security in Gaza was injured in an apparent assassination attempt, with a small explosion in his car.

In March a senior party leader, Mazen Faqha, was shot dead inside Gaza, with Hamas accusing Israel of responsibility.

He remained a prominent official though not a member of the current politburo