Unrwa said it was “the highest death toll among our staff in a single incident” since the start of the war between Israel and Hamas in October.
Hospital officials and the Hamas-run Civil Defence agency said earlier that at least 14 people had been killed in the strike on al-Jaouni school in Nuseirat refugee camp, which is being used as a shelter by thousands of displaced Palestinians.
Israel’s military says it carried out a “precise strike on terrorists” planning attacks from inside the school, adding that it had taken measures to mitigate harm to civilians.
Unrwa said it was the fifth time the school had been hit over the past 11 months.
In July, 16 people were reportedly killed in a strike which the Israeli military said had targeted several structures at the school used by Hamas fighters.
Hamas – which is proscribed as a terrorist group by Israel, the UK and other countries – has denied using schools and other civilian sites for military purposes.
Israeli forces launched a campaign to destroy Hamas in response to the group’s unprecedented attack on southern Israel on 7 October, in which about 1,200 people were killed and 251 others were taken back to Gaza as hostages.
More than 41,080 people have been killed in Gaza since then, according to the territory’s Hamas-run health ministry.
UN spokesman Stéphane Dujarric told reporters the UN condemned “all air strikes that target civilians and those that also target UN facilities”.
Video of the aftermath of Wednesday’s air strike showed hundreds of people inspecting the heavily damaged ground floor of one wing of al-Jaouni school, as well as the remains of an adjoining structure that appeared to have been destroyed.
Other footage showed ambulances bringing wounded men, women and children said to have been wounded in the strike to al-Aqsa hospital in the town of Deir al-Balah.
A medical source at al-Awda hospital in Nuseirat camp told the AFP news agency that nine people killed in the strike had been brought there, and that six others had been taken to al-Aqsa hospital.
The Associated Press cited hospital officials as saying that al-Awda had received 10 bodies and al-Aqsa another four, and that they included one woman and two children.
Civil Defence spokesman Mahmoud Bassal also put the death toll at 14.
In a post on Telegram, the agency identified one of those killed as the daughter of one of its rescue workers, Momin Salmi. It said he had not seen Shadia for 10 months because he had stayed in northern Gaza while his wife and their eight children had fled southwards.
The Israel Defense Forces (IDF) said aircraft had “conducted a precise strike on terrorists who were operating inside a Hamas command and control centre” embedded inside al-Jaouni school.
“Numerous steps were taken to mitigate the risk of harming civilians, including the use of precise munitions, aerial surveillance and additional intelligence,” it added.
“This is a further example of the Hamas terrorist organisation’s systematic abuse of civilian infrastructure in violation of international law.”
Gaza’s Hamas-run government media office accused Israel of a “brutal massacre”.
Later, Unrwa said in a statement that two air strikes had hit the school and its surroundings, which were home to around 12,000 displaced people, mainly women and children.
“Among those killed was the manager of the Unrwa shelter and other team members providing assistance to displaced people,” it said.
The agency insisted that “schools and other civilian infrastructure must be protected at all times”, adding: “They are not a target.”
“We call on all parties to the conflict to never use schools or the areas around them for military or fighting purposes.”
Hours before the incident, Unrwa said in a situation report that almost 70% of its schools in Gaza had been hit during the war.
It also reported that 214 of its staff members had been killed, along with at least 563 displaced people who had been sheltering inside its schools and other installations.
Israel has previously accused Unrwa of supporting Hamas.
The agency has denied this, but the UN said in August that it had fired nine of Unrwa’s 13,000 staff in Gaza after investigators found evidence that they might have been involved in the 7 October attack. Another 10 staff were cleared because of insufficient evidence.
Israel also alleged that hundreds of Unrwa staff were members of terrorist groups, but a UN review published in April found Israel had not provided evidence for its claims.
In a separate development on Wednesday, the IDF announced that two Israeli soldiers had been killed and eight others injured in a helicopter crash overnight in southern Gaza.
The helicopter was on a mission to evacuate a critically injured soldier to a hospital for medical treatment and crashed while landing in the Rafah area, a statement said.
“An initial inquiry conducted indicates that the crash was not caused by enemy fire. The cause of the crash is still under investigation,” it added.