Iran held a funeral ceremony on Thursday with calls for revenge after the killing in Tehran of Hamas political chief Ismail Haniyeh in a strike blamed on Israel.
The Islamic republic's supreme leader Ayatollah Ali Khamenei led prayers for Haniyeh ahead of his burial in Qatar, having earlier threatened a "harsh punishment" for his killing.
In Tehran's city centre, thousands of mourning crowds carrying posters of Haniyeh and Palestinian flags gathered for the ceremony at Tehran University before a procession, according to an AFP correspondent.
Iran's Revolutionary Guards announced Haniyeh's death the day before. They said he and a bodyguard were killed in a strike on their accommodation in the Iranian capital at 2:00 am (2230 GMT) on Wednesday.
It came just hours after Israel targeted and killed top Hezbollah commander Fuad Shukr in a retaliatory strike on the Lebanese capital Beirut, raising fears of a wider regional conflict as the Israel-Hamas war in Gaza continues unabated.
Israel has declined to comment on the Tehran strike.
Iran's state TV showed the coffins of Haniyeh and his bodyguard covered in Palestinian flags during the ceremony attended by senior Iranian officials including President Masoud Pezeshkian and Islamic Revolutionary Guard Corps chief, General Hossein Salami.
Haniyeh had been visiting Tehran for Pezeshkian's inauguration ceremony on Tuesday.
Khalil al-Hayya, Hamas's foreign relations chief, vowed during the funeral ceremony that Haniyeh's message will live on and "we will pursue Israel until it is uprooted from the land of Palestine".
The caskets, with a black-and-white pattern resembling a Palestinian keffiyeh scarf, were borne on a flower-decorated truck through city streets jammed with mourners cooled by water spray on a hot day.
Iran's conservative parliamentary speaker Mohammad Bagher Ghalibaf said Iran "will certainly carry out the supreme leader's order (to avenge Haniyeh)".
"It is our duty to respond at the right time and in the right place," he said, as crowds chanted "Death to Israel, Death to America!"
Khamenei said after Haniyeh's death that it was "our duty to seek revenge for his blood as he was martyred in the territory of the Islamic Republic of Iran".
The New York Times, citing Iranian officials, reported that Khamenei has ordered that Iran strike Israel directly.
The international community, however, called for calm and a focus on securing a ceasefire in Gaza -- which Haniyeh had accused Israel of obstructing.
UN Secretary-General Antonio Guterres said the strikes in Tehran and Beirut represented a "dangerous escalation".
The United Nations Security Council convened an emergency meeting Wednesday at Iran's request to discuss the incident.
In a phone call, the foreign ministers of Jordan and Egypt blamed Israel for rising tensions and "stressed the need to work on de-escalation to prevent the region from slipping into a comprehensive regional conflict", Jordan's official Petra news agency reported.
US Secretary of State Antony Blinken on Thursday reiterated appeals for an end to fighting. He said achieving peace "starts with a ceasefire" and called on "all parties" to "stop escalatory actions".
But the prime minister of key ceasefire broker Qatar said Haniyeh's killing had thrown the whole Gaza war mediation process into doubt.
"How can mediation succeed when one party assassinates the negotiator on the other side?" Sheikh Mohammed bin Abdulrahman Al-Thani said on social media site X.
While Iran has blamed the attack on its arch-foe, Israel has declined to comment on Haniyeh's death but it did claim the killing of Hezbollah commander Shukr, blaming for a weekend rocket strike that killed 12 youths in the Israeli-annexed Golan Heights.
The killings are the latest of several incidents that have inflamed regional tensions during the war in Gaza which has drawn in Iran-backed militant groups in Syria, Lebanon, Iraq and Yemen.
One of them, Yemen's Huthi rebels, "declared three days of mourning" for Haniyeh, according to the group's Saba news agency.
The Huthis earlier this month claimed a drone strike on Tel Aviv, their first fatal attack in Israel. Israel retaliated against Yemen's rebel-controlled Hodeida port, its first claimed strike in Yemen.
In April, after a strike killed Revolutionary Guards at its consulate in Damascus, Iran made its first ever direct attack on Israeli soil, firing a barrage of drones and missiles.
Explosions later hit central Iran, in what US media said was Israeli retaliation.
Hamas has for months been indirectly negotiating a truce and hostage-prisoner exchange deal with Israel, in talks facilitated by Egypt, Qatar and the United States.
Israeli Prime Minister Benjamin Netanyahu has vowed to destroy Hamas in retaliation for Hamas's October 7 attack on Israel that ignited war in Gaza.
That attack resulted in the deaths of 1,197 people, mostly civilians, according to an AFP tally based on official Israeli figures.
Militants also seized 251 hostages, 111 of whom are still held captive in Gaza, including 39 the military says are dead.
Concern over the fate of those still held has grown among Israelis.
Haniyeh's killing "was a mistake as it threatens the possibility of having a hostage deal," said Anat Noy, a resident of the coastal city of Haifa.
Israel's retaliatory campaign against Hamas has killed at least 39,480 people in Gaza, according to the Hamas-run territory's health ministry.