Three Israeli bombs hit the al-Tabin school, located in Daraj district, Gazaโs civil defence agency said of the attack on Saturday which it described as a โhorrific massacreโ.
Women, children and the elderly are reported to be among the dead and the toll was expected to rise. The attack took place while people were performing morning prayers and triggered a fire that ripped through the building.
Ismail al-Thawabta, the head of Gazaโs Government Media Office, told Al Jazeera that the Israeli army used three bombs weighing 2,000 pounds (907kg) each in its attack.
He added Israel was aware of the presence of displaced people inside the school.
Israeli forces have repeatedly attacked schools used as shelters, claiming they are command centres for Hamas, the Palestinian group that governs Gaza, to hide fighters and manufacture weapons.
Saturdayโs attack was the fourth such incident in a week. Israel has not presented evidence to prove its claims that schools are being used by Hamas.
Hamas has denied Israeli accusations that it operates from civilian facilities such as schools and hospitals.
โThe occupation army directly bombed the displaced people while they were performing the dawn prayer, and this caused the number of martyrs to rise rapidly,โ the Gaza Government Media Office announced in a statement following the attack.
Palestinian journalist Hossam Shabat reported that rescue teams were unable to help those trapped by the flames as the Israeli military cut water access to the area.
Many of the wounded rushed to the al-Ahli Hospital in Gaza City were in a critical condition.
Some of the bodies were hard to recognise, โso relatives at the hospital searching for their loved ones are struggling to find any way to identify themโ.
โThe massacre at al-Tabin school in the Daraj neighbourhood in central Gaza City is a horrific crime that constitutes a dangerous escalation,โ Hamas announced in a statement.
Izzat al-Rishq, a member of the Palestinian groupโs political bureau, stressed there were no armed men at the school.
Israelโs claims of the school being used as the groupโs command centre are โexcuses to target civilians, schools, hospitals, and refugee tents, all of which are false pretexts and exposed lies to justify its crimesโ.
โWe call on our Arab and Islamic countries and the international community to fulfill their responsibilities and take urgent action to stop these massacres and halt the escalating Zionist aggression against our people and defenseless citizens,โ the statement read.
Fatah, the rival Palestinian faction that last month signed a โnational unityโ agreement with Hamas, said in a statement the attack was a โheinous bloody massacreโ that represents the โpeak of terrorism and criminalityโ.
โCommitting these massacres confirms beyond a shadow of a doubt its efforts to exterminate our people through the policy of cumulative killing and mass massacres that make living consciences tremble,โ it added.
The attack comes as Qatar, Egypt and the United States have called on Israel and Hamas to resume talks on August 15 to reach a ceasefire.
Gazaโs Ministry of Health says at least 39,699 people have been killed and 91,722 wounded in Israelโs war on the enclave. An estimated 1,139 people were killed in Israel during the Hamas-led attacks on October 7 and more than 200 were taken captive.