An Israeli mobile artillery unit fires toward Gaza from southern Israel. AFP

The Israeli military said Thursday it had carried out a deadly strike on a UN school in Gaza that it said housed a Hamas compound, with the militant group saying the attack killed at least 27 people.

The military said it "eliminated" several "terrorists" after its jets "conducted a precise strike on a Hamas compound embedded inside an UNRWA school in the area of Nuseirat", in central Gaza. UNRWA is the UN agency for Palestinian refugees.

Hamas's media office said the strike killed at least 27 people and wounded dozens more, calling it a "horrific massacre... that shames humanity".

Gaza's bloodiest ever war was sparked by Hamas's October 7 attack on southern Israel, which resulted in the deaths of 1,194 people, mostly civilians, according to an AFP tally based on Israeli official figures.

Militants also took 251 hostages, 120 of whom remain in Gaza, including 41 the army says are dead.

Israel's ensuing bombardment and ground offensive have killed at least 36,586 people in Gaza, also mostly civilians, according to the Hamas-run territory's health ministry.

Israel has faced growing diplomatic isolation over its conduct of the war, with cases against it before two international courts, and several European governments recognising a Palestinian state.

Israel has frequently accused Hamas and its allies in Gaza of using schools, health facilities and other civilian infrastructure as operational centres -- charges the militants deny.

UNRWA, which coordinates nearly all aid to Gaza, has been in crisis since January, when Israel accused about a dozen of its 13,000 employees in the territory of being involved in the October 7 attack.

Its chief, Philippe Lazzarini, said last week that Israel "must stop its campaign against UNRWA" in an opinion article published by the New York Times.

The latest strike came as US, Qatari and Egyptian mediators resumed talks Wednesday to try to secure a truce and hostage release deal.

US President Joe Biden last week outlined what he called a three-phase Israeli plan to halt the fighting for six weeks while hostages held by militants in Gaza are exchanged for Palestinian prisoners and aid is stepped up.

G7 powers and Arab states have backed the proposal announced by Biden, although sticking points remain -- Hamas insists on a permanent truce and full Israeli withdrawal, demands that Israel has flatly rejected.

A source with knowledge of the negotiations confirmed to AFP that a meeting took place on Wednesday "between the Qatari prime minister and head of Egyptian intelligence with Hamas in Qatari capital Doha to discuss a deal for a truce in Gaza and the exchange of hostages and prisoners".

Biden has urged Hamas to accept the deal and has deployed CIA chief Bill Burns to Qatar, where the group's political bureau is based, for a renewed push after months of negotiations.

The source said Burns would "continue working with mediators on reaching an agreement between Hamas and Israel on a ceasefire in Gaza and the release of hostages".

Biden earlier told Qatar's emir that "Hamas is now the only obstacle to a complete ceasefire", and "confirmed Israel's readiness to move forward" with the terms he set out last week.

A senior Hamas official in Beirut on Tuesday accused Israel of seeking "endless" negotiations and reiterated the group's position rejecting any deal that excludes a permanent ceasefire.

Hamas leader Ismail Haniyeh said his group would "deal seriously and positively" with any offer meeting those demands.

Muhammad al-Najjar, a 35-year-old man from northern Gaza twice displaced by the war, told AFP: "We just want to solve and end the catastrophic situation that we are living. What matters to us is that the war made us exhausted, destroyed us and destroyed everything in our lives."

In Jerusalem, Israeli police deployed 3,000 officers ahead of the annual march by right-wingers commemorating Israel's capture of the Old City in the 1967 Arab-Israeli war.

The march draws Israeli religious ultranationalists and Zionist youth groups, and leads through the city's Muslim Quarter to the Western Wall. It has been a lightning rod for Israeli-Palestinian tensions in recent years.

Tensions have also spiralled elsewhere in the region between Israel and its allies on the one hand, and Iran-backed armed groups in Lebanon, Iraq, Syria and Yemen on the other.

The Israeli army and Lebanon's Hezbollah movement have traded near-daily cross-border fire, causing deaths, forcing mass evacuations and igniting wildfires on both sides.

Prime Minister Benjamin Netanyahu said on Wednesday that Israel was "prepared for a very intense operation" along the border with Lebanon and that "one way or another, we will restore security to the north".

The United States appeared to warn Israel against taking action on Wednesday, with the State Department saying that any "escalation" there would risk Israeli security.

On the Israeli side, the army says at least 14 soldiers and 11 civilians have been killed.