JERUSALEM — Hamas confirmed Friday that its leader, Yahya Sinwar, was killed by Israeli forces in Gaza and reiterated its stance that hostages the militant group took from Israel a year ago will not be released until there is a cease-fire in Gaza and a withdrawal of Israeli troops.

The group’s staunch position pushed back against a statement by Israeli Prime Minister Benjamin a day earlier that his country’s military will keep fighting until the hostages are released and will remain in Gaza to prevent a severely weakened Hamas from rearming.

The conflicting stands signal continued deep resistance on both sides to ending the war, even as President Joe Biden and other world leaders press the case that Sinwar’s death is a turning point that should be used to unlock stalled cease-fire negotiations.

The standoff comes as Israel’s war with Lebanon’s Hezbollah — a Hamas ally backed by Iran — has intensified in recent weeks. Hezbollah said Friday it planned to launch a new phase of fighting by sending more guided missiles and exploding drones into Israel. The militant group’s longtime leader, Hassan Nasrallah, was killed in an Israeli airstrike late last month, and Israel sent ground troops into Lebanon earlier this month.

Sinwar, the former lead of Hamas, died “confronting the occupation army until the last moment of his life,” said his Qatar-based deputy, Khalil al-Hayya, who represented Hamas during several rounds of cease-fire negotiations. Hamas will not return any of the hostages, al-Hayya said, “before the end of the aggression on Gaza and the withdrawal from Gaza.”

Hamas heralded Sinwar in a statement, calling him a hero for “not retreating, brandishing his weapon, engaging and confronting the occupation army at the forefront of the ranks.”

The statement appeared to refer to a video the Israeli military circulated of Sinwar’s apparent last moments in which a man sits on a chair in severely damaged building, badly wounded and covered in dust. In the video, the man raises his hand and flings a stick at an approaching Israeli drone.

Sinwar was the chief architect of the Hamas raid on Israel last year that killed some 1,200 people, mostly civilians, and kidnapped another 250. Israel’s retaliatory offensive in Gaza has killed over 42,000 Palestinians, according to local health authorities, who do not distinguish combatants from civilians but say more than half the dead are women and children.

The war has destroyed vast swaths of Gaza, displaced about 90% of its population of 2.3 million people and has left them struggling to find food, water, medicine and fuel.

Sinwar’s killing appeared to be a chance front-line encounter with Israeli troops on Wednesday, and it could shift the dynamics of the Gaza war even as Israel presses its offensive against Hezbollah with ground troops in southern Lebanon and airstrikes in other areas of the country.

Hezbollah has fired rockets into Israel nearly every day since the Israel-Hamas war began, displacing tens of thousands of Israelis from their homes in the country’s north. More than 1 million people in Lebanon have been displaced by Israel’s aerial bombardment and ground offensive.

Iran, which also supports Hamas, hailed Sinwar Friday as a martyr who can inspire others in challenging Israel.

“We, and countless others around the world, salute his selfless struggle for liberation of the Palestinian people,” Iran’s foreign minister, Abbas Araghchi, wrote on the X social media platform.