Hamas’s political leader, Ismail Haniyeh , was targeted and killed in the Iranian capital Tehran, the country’s Islamic Revolutionary Guard Corps said Wednesday.

The IRGC said it was still investigating the cause of the incident.

Hamas confirmed the death of Haniyeh, saying the leader had been killed by Israel after attending the inauguration ceremony Tuesday of the new president of Iran, Masoud Pezeshkian.

Israel didn’t immediately comment on Haniyeh’s death.

Israel has said it would target Hamas leaders for launching the Oct. 7 attacks that sparked the war in Gaza.

The targeted killing of Haniyeh would mark the highest-ranking death of a Hamas political official since the conflict began.

The announcement of Haniyeh’s death came just hours after Israel said it killed a senior Hezbollah leader in Beirut , a strike that already risked further expanding the war in Gaza beyond the strip to the wider Middle East.

Iran, the Middle East’s Shiite power, backs both Hamas and Hezbollah, and Haniyeh’s killing on Iranian soil is likely to heighten regional tensions just as the U.S. is pushing Israel and Hamas to agree on a cease-fire in Gaza.

The death would be viewed as a major win for Israeli Prime Minister Benjamin Netanyahu , who has vowed to take out Hamas leaders for launching the Oct. 7 attacks that Israel says killed 1,200 people and saw 250 taken hostage.

Israel’s military operations in Gaza following the Oct. 7 assault have left more than 39,000 people dead in the enclave, according to Palestinian health authorities, who don’t say how many were combatants.

Haniyeh, as Hamas’s overall political leader, was part of a complex and secretive Hamas leadership structure that includes a military wing and a political arm.

Throughout the war in Gaza, Hamas’s leader in the strip, Yahya Sinwar , has been viewed as the key decision maker, as he has been closest to the U.S.-designated terrorist group’s military wing on the ground.

But Haniyeh was also viewed as an important decision maker in Hamas’s consensus-driven leadership, and his death is likely to complicate delicate cease-fire talks mediated by Arab nations.

Haniyeh was close to the spiritual founder of Hamas, Sheikh Yassin, and rose through the ranks of the organization, first becoming leader in Gaza, before taking on overall leadership of the group’s political wing in 2017.

Haniyeh is now one of a series of Hamas military and political officials who have died or are believed dead since the start of the war.

Write to Rory Jones at Rory.Jones@wsj.com