The attack took place on Saturday in Jabalia in northern Gaza against the Halwa school. Among the dead are two children and two women. About 30 people are reported to have been injured, including 19 children.
The school building is said to have housed "thousands of displaced people".
Israel confirms that it carried out the attack and says it was directed against Hamas fighters.
According to Israel, it was a precision strike against "terrorists in a command and control center". Israel claims that the school building was used by "Hamas terrorists to plan and carry out attacks".
The attack is the latest in a series of Israeli attacks on school buildings that house people fleeing.
Israel's military accuses Hamas, labeled as a terrorist organization, of hiding in school buildings where thousands of Gazans are seeking shelter – an accusation denied by Hamas.
Israel announced on Saturday evening that four soldiers had been killed in northern Gaza. It is unclear when they were killed. A total of 800 Israeli soldiers have been killed in the war. Almost half of them were killed in connection with Hamas terrorist attacks that triggered the war on October 7, 2023.
According to the Hamas-controlled health department, at least 46,537 Palestinians, the majority of whom are civilians, have been killed in Israeli attacks on Gaza since the war began on October 7, 2023, following Hamas' large-scale terrorist attack on Israel. The UN has deemed the figures reliable.