Hamas on Tuesday named Yahya Sinwar, the man Israel says masterminded the October 7 attack that sparked the Gaza war, as its new political chief following last week's killing of his predecessor Ismail Haniyeh.

The announcement came with the Middle East on edge as it awaited Iran's retaliation over the killing of Haniyeh in Tehran.

Iran blames Haniyeh's death on Israel and has vowed to avenge him, while Hamas's Lebanese ally Hezbollah has also pledged to retaliate for his killing and that of its military commander Fuad Shukr in an Israeli strike in Beirut hours earlier.

Sinwar, who has been Hamas's leader in Gaza since 2017 -- with Haniyeh living in Qatar -- has not been seen since the October 7 attack.

A senior Hamas official told AFP that the selection of Sinwar sent a message that the militant group "continues its path of resistance".

Jibril Rajoub, secretary of the Central Committee of the rival Fatah movement that runs the Palestinian Authority in the occupied West Bank, said the decision was "logical and expected".

Hezbollah congratulated Sinwar and said the appointment affirms "the enemy... has failed to achieve its objectives" by killing Hamas leaders and officials.

Israeli Foreign Minister Israel Katz said Sinwar's appointment was "yet another compelling reason to swiftly eliminate him and wipe this vile organisation off the face of the earth".

Analysts believe Sinwar has been more reluctant than Haniyeh to agree to a ceasefire deal.

US Secretary of State Antony Blinken told reporters on Tuesday that it was up to Sinwar to help achieve a ceasefire as he "has been and remains the primary decider".

Meanwhile, in a televised address to mark one week since Shukr's death, Hezbollah leader Hassan Nasrallah said his group and Tehran were "obliged to respond" to the deaths of Haniyeh and Shukr.

Nasrallah said Hezbollah would retaliate "alone or in the context of a unified response from all the axis" of Iran-backed groups in the region, "whatever the consequences".

Minutes before his speech, Israeli jets flew low over the Lebanese capital, breaking the sound barrier in a show of force.

- 'Around the clock' -

With the region on edge, the United States said it was working "around the clock" to avert an all-out war.

It has sent extra warships and fighter jets to the region in support of Israel, and President Joe Biden called Jordan's King Abdullah II, whose country helped down Iranian drones and missiles in an attack on Israel in April.

This was followed by a call with Qatari Emir Tamim bin Hamad Al Thani and another with Egyptian President Abdel Fattah El-Sisi, whose countries have been the key intermediaries seeking a ceasefire in the 10-month Gaza war.

Blinken also called top officials in Qatar and Egypt.

"We are engaged in intense diplomacy, pretty much around the clock, with a very simple message -- all parties must refrain from escalation," Blinken said after joining other top officials in a White House meeting.

That message was communicated "directly" to Iran and Israel, he told reporters later on Tuesday.

Iranian President Masoud Pezeshkian hit out on Monday at what he called the "criminal acts" of Israel "against the oppressed and defenceless people of Gaza", as well as for Haniyeh's killing.

"The Islamic Republic of Iran is in no way seeking to expand the scope of war and crisis in the region, but this regime will definitely receive the response for its crimes and arrogance," Pezeshkian said, according to the official news agency IRNA.

Israel has not commented on Haniyeh's killing but confirmed it had carried out the strike on Shukr.

It held the Hezbollah commander responsible for a rocket attack in the Israeli-annexed Golan Heights that killed 12 children, calling him the "right-hand man" of Nasrallah.

- 'Playing with fire' -

Hezbollah has traded near-daily cross-border fire with Israeli troops throughout the Gaza war.

The group said Tuesday that six of its fighters were killed in Israeli strikes on southern Lebanon and that it had launched "dozens of Katyusha rockets" at a military base in the Golan Heights in retaliation.

Regional councils in northern Israel urged residents to stay close to shelters after a barrage of rockets.

Lebanese Foreign Minister Abdallah Bou Habib, on a visit to Cairo, acknowledged that there was "a possibility of a war between us and Israel... We can't deny that."

A European diplomat in Tel Aviv said "a coordinated response" against Israel from Iran and its proxies was expected.

"That doesn't mean there will be a simultaneous response from all fronts," he added, declining to be identified as he was not authorised to speak on the issue.

"They have to stop playing with fire, because the risk of flare-ups is higher than at any time since October 7," he said.

Numerous airlines have suspended flights to Lebanon or limited them to daylight hours.

Lebanese national carrier Middle East Airlines has added extra flights for people wanting to leave or return, a company source said.

- 'Act urgently' -

The United Nations' rights chief Volker Turk called on "all parties, along with those states with influence, to act urgently to de-escalate what has become a very precarious situation".

The Israel-Hamas war in the Gaza Strip, triggered by the Palestinian group's unprecedented October 7 attack on Israel, has already drawn in Iran-backed militants in Syria, Lebanon, Iraq and Yemen.

The Hamas attack resulted in the deaths of 1,198 people, mostly civilians, according to an AFP tally based on Israeli official figures.

Palestinian militants seized 251 hostages, 111 of whom are still held in Gaza, including 39 the Israeli military says are dead.

Israel's retaliatory military campaign in Gaza has killed at least 39,653 people, according to the Hamas-run territory's health ministry, which does not give details of civilian and militant deaths.

In the occupied West Bank, Palestinian officials said Israeli forces killed 12 people in three separate raids on Tuesday.