Israel has not commented, but it has promised to destroy Hamas following the 7 October attack on southern Israel which killed 1,200 .
Israel has responded with a massive military operation in the Hamas-controlled Gaza Strip which has killed at least 39,400 , according to the Hamas-run health ministry.
According to Hamas, Haniyeh was in Tehran to take part in the inauguration ceremony of the new Iranian President Masoud Pezeshkian, who was sworn in on Tuesday.
The group's political bureau member Musa Abu Marzuk said it was a "cowardly act" and one which "will not go unanswered"; while another senior Hamas official, Sami Abu Zuhri, said the group would "continue on its path".
Iran's foreign ministry said the "martydom" of Haniyeh will "strengthen the deep and unbreakable bond between Tehran, Palestine and the resistance," state media reported.
The Russian and Turkish foreign ministries also condemned the attack.
Haniyeh’s death comes just a hours after Israel claimed it killed the top military commander of Hezbollah, a Lebanon-based group, also backed by Iran.
Israel said it killed Fuad Shukr in an air strike, in retaliation for a rocket attack in the Israeli-occupied Golan Heights at the weekend.
Hezbollah has not yet confirmed that a senior commander was killed by an Israeli attack in Beirut on Tuesday, but has said Shukr was in a building which was targeted.
"Since the incident, the civil defence teams have been working to lift the rubble steadily, but slowly, due to the situation of the destroyed classes, and we are still waiting for the result," a statement released by the group on Wednesday said.
Haniyeh was a prominent member of Hamas in the late 1980s and was imprisoned by Israel for three years in 1989 as it cracked down on the first Palestinian uprising.
He was then exiled in 1992 to a no-man's-land between Israel and Lebanon, along with a number of Hamas leaders.
Haniyeh was appointed Palestinian prime minister in 2006 by President Mahmoud Abbas after Hamas won the most seats in national elections, but he was dismissed a year later after the group ousted Mr Abbas' Fatah party from the Gaza Strip in a week of deadly violence.
Haniyeh rejected his sacking as "unconstitutional", stressing that his government "would not abandon its national responsibilities towards the Palestinian ", and continued to rule in Gaza.
He was elected head of Hamas's political bureau in 2017.
In 2018, the US Department of State designated Haniyeh a terrorist. He had lived in Qatar for the past several years.
A brief guide to some of the leading figures in the group behind the attacks on Israel.
One of the patients had been waiting six months to be able to get out of the war-torn territory.
Copyright 2024 BBC. . Theis