- The Israeli military said it had targeted a Hamas command and control centre inside the school, and that it had taken steps to mitigate risk of harming civilians.
- Earlier, it announced that troops had recovered the bodies of six Israeli hostages being held in the Khan Younis area.
At least 12 Palestinians have been killed in an Israeli air strike on a school housing displaced people in Gaza City, the Hamas-run Civil Defence authority says.
A spokesman said rescuers were struggling to recover a number of missing people believed to be trapped under the rubble at Mustafa Hafez school in the western Rimal neighbourhood.
The Israeli military said it had targeted a Hamas command and control centre inside the school, and that it had taken steps to mitigate risk of harming civilians.
Earlier, it announced that troops had recovered the bodies of six Israeli hostages being held in the Khan Younis area.
The men were among the 251 people kidnapped by Hamas-led gunmen in the 7 October attacks on southern Israel last year, when about 1,200 people were also killed.
Israel launching an air and ground campaign to destroy Hamas in response, during which more than 40,170 people have been killed in Gaza, according to the territory's Hamas-run health ministry.
Women and children can be heard screaming and seen running from the dust-enveloped Mustafa Hafez school in a video posted on social media showing the immediate aftermath of Tuesday morning’s strike.
The camera then pans to show rubble on the ground beside the completely flattened remains of a two-storey building.
"We were sitting safely, we did not see the explosion," witness Umm Mohammed later told Reuters news agency.
"The people are gone, they're dead. They are under the rubble."
Civil Defence spokesman Mahmoud Basal said in the afternoon that rescue crews had so far recovered the bodies of 12 people.
He said the strike had targeted the entire wing of the school, where he estimated that 700 displaced people had been living.
The Israel Defense Forces (IDF) said aircraft had conducted a “a precise strike on terrorists who were operating within a Hamas command and control centre” which had been embedded inside the school and used to plan and launch attacks against its troops and Israel.
"Prior to the strike, numerous steps were taken to mitigate the risk of harming civilians, including the use of precise munitions, aerial surveillance and additional intelligence," it added.
The IDF accused Hamas of violating international law by operating within civilian infrastructure and exploiting Gaza’s civilian population - allegations which Hamas has previously denied.
Earlier this month, the UN Human Rights Office condemned what it called the "increasing frequency" of Israeli strikes on schools sheltering displaced people and accused the IDF of conducting them "with apparent disregard for the high rate of civilian fatalities".
The warning after at least 70 Palestinians were killed in an air strike on al-Taba’een school in Gaza City, according to the director of a local hospital.
The IDF said the school had "served as an active Hamas and Islamic Jihad military facility", and that it had confirmed the identities of 31 "terrorists" who were killed.
The UN said at the time that it had been at least the 21st strike on a school serving as a shelter since 4 July and that they had resulted in at least 274 fatalities.
Also on Tuesday, the civil defence said five people had been killed in a strike on a house in Bureij refugee camp, in central Gaza, while Palestinian news agency Wafa cited medical sources as saying four had been killed in nearby Deir al-Balah.
The IDF said its troops and aircraft had "eliminated numerous terrorists" operating in central Gaza, including two who exited an underground tunnel and attempted to plant an explosive device.
It came as the US Secretary of State, Antony Blinken, visited Egypt to continue to apply diplomatic pressure to try to secure a ceasefire and hostage release deal between Israel and Hamas.
The BBC's Tom Bateman, who is travelling with Mr Blinken, says the Americans hope for some sort of breakthrough within the next week or so, but that the mood on the ground in the region has not matched that expectation.
After talks with Israeli Prime Minister Benjamin Netanyahu on Monday, Mr Blinken said Israel had accepted a US proposal aimed at bridging the remaining gaps between the warring parties.
But Hamas accused the US of "acquiescing" to what it called Mr Netanyahu's "new conditions". The group also criticised as misleading President Joe Biden’s claim that it seemed to be “backing away” from an agreement.
A major sticking point is Mr Netanyahu's insistence that Israeli troops remain in the Philadelphi corridor, a narrow strip of land running along Gaza’s border with Egypt, which Hamas has rejected.
He says it is necessary to prevent smuggling and Hamas rearming itself, but Hamas says it would amount to continued Israeli occupation and not an end to the war.