GAZA CITY, Gaza Strip — Israeli tank shells hit a compound housing a U.N. school in the Gaza Strip on Thursday, killing at least 15 people and wounding dozens who were seeking shelter from fierce clashes on the streets outside, Palestinian officials said, as Israel pressed forward with its 17-day war against the territory’s Hamas rulers.

The U.N. said the strike occurred as staff members were trying to arrange a humanitarian pause in the hostilities so they could evacuate the civilians from the compound in the northern town of Beit Hanoun. The Israeli military said it was reviewing the incident and suggested Hamas rockets may have been to blame, although it offered no proof.

Kamel al-Kafarne, who was in the school, said that the U.N. was putting people on buses when three tank shells hit.

“We were about to get out of the school, then they hit the school. They kept on shelling it,” he said.

Books, blankets, cushions and other belongings were scattered about the courtyard in the aftermath of the explosion. There was a large scorch mark in the courtyard marking the apparent site of impact. A sandal with a yellow flower lay beside a puddle of blood, and sheep and a horse that had belonged to those seeking shelter grazed nearby. Dozens of people, including children, were wheeled into a nearby hospital.

It was the fourth time a U.N. facility has been hit in fighting between Israel and Palestinian militants in Gaza, since the conflict began July 8. UNRWA, the Palestinian refugee agency, has said it has found militant rockets inside two vacant schools.

The Palestinian Red Crescent said Israeli shells had hit the compound.

The Israeli military said Hamas had launched rockets that fell in the area that could have been responsible for the deaths.

“We can’t confirm that this is a result of errant fire. In any case, we do not target U.N. facilities,” military spokesman Lt. Col. Peter Lerner said. Lerner said the military had urged the U.N. and the Red Cross to evacuate the school for three days leading up to the incident.

The U.N. said it was trying to do just that when the school was hit.