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. Agency spokesman Chris Gunness said the U.N. had asked the Israeli military for a lull in fighting to allow for the school’s evacuation but did not hear back.
U.N. Secretary-General Ban Ki-moon said U.N. staff were among the casualties and demanded that Israel and Hamas abide by international humanitarian law, respect ‘‘the sanctity of civilian life, the inviolability of U.N. premises’’ and protect humanitarian workers. He said more than 100,000 Gazans have sought refuge in UNRWA facilities.
‘‘Today’s attack underscores the imperative for the killing to stop — and to stop now,’’ Ban said during a visit to Iraq.
Israel insists it does its utmost to prevent civilian casualties but says Hamas puts Palestinians in danger by hiding arms and fighters in civilian areas. Hamas spokesman Fawzi Barhoum condemned the violence, saying Israel was targeting displaced people and ‘‘committing massacres.’’
Dozens of other people also were killed in a day of heavy fighting throughout the coastal territory, raising the overall Palestinian death toll in the conflict to at least 788, Gaza health official Ashraf al-Kidra said. Israel has lost 32 soldiers, all since July 17, when it widened its air campaign into a full-scale ground operation. Two Israeli civilians and a Thai worker in Israel have also been killed by rocket or mortar fire.
With the number of casualties growing on both sides, the international community has stepped up diplomatic efforts to broker a cease-fire. But Hamas is insisting on the lifting of the 7-year-old blockade, which was imposed when the Islamic militant group seized control of Gaza from the Western-backed government of Palestinian President Mahmoud Abbas. Israel says the war is meant to halt rocket fire from Palestinian militants in Gaza and destroy a sophisticated network of cross-border tunnels.
Israel imposed the blockade in 2006 after Hamas and other militants abducted an Israeli soldier in a deadly cross-border raid. It tightened the siege in 2007 after Hamas seized power from forces loyal to Western-backed Palestinian President Mahmoud Abbas, but had eased some of the restrictions in recent years.
Egypt tightened its own restrictions last year after the overthrow of a Hamas-friendly government in Cairo and has destroyed many of the cross-border smuggling tunnels that sustained Gaza’s economy, and which were also used by Hamas to bring in arms.
U.S. Secretary of State John Kerry spent the day in Cairo feverishly calling on regional leaders to help push Israel and Hamas agree to a cease-fire as a necessary first step toward resolving some their long-standing mutual grievances.
As in years past — most recently in 2012 — the U.S. wants the violence to stop before it tries to negotiate specific demands each side has put forward. For Hamas, that includes the release of Palestinian prisoners in addition to the end of the economic blockade against Gaza.
Kerry did not make any public appearances on Thursday as he called foreign ministers in Turkey and Qatar — who have influence with Hamas — and Netanyahu to try to press a solution. Like Israel, the U.S. considers Hamas a terrorist organization and will not directly engage with its leaders.
State Department spokeswoman Jen Psaki said Thursday’s attack on the U.N. school ‘‘underscores the need to end the violence and to achieve a sustainable cease-fire and enduring resolution to the crisis in Gaza as soon as possible.’’
‘‘We call on all parties to protect these facilities from the conflict and we have condemn those responsible for hiding weapons in United Nations facilities in Gaza,’’ Psaki added.
British Foreign Secretary Philip Hammond, meanwhile, urged Hamas to agree on an immediate humanitarian cease-fire and said Israel and Palestinian Authority could then come together to hold talks.
‘‘Hamas must agree to a humanitarian cease-fire without preconditions for the sake of the people in Gaza,’’ he said during a news conference after meetings with Egyptian officials in Cairo.
Israeli Prime Minister Benjamin Netanyahu, however, made no reference to the cease-fire efforts in underscoring his determination to neutralize the rocket and tunnel threats.
More than 2,000 rockets have been fired at Israel from Gaza since July 8, and the Israeli military says it has uncovered more than 30 tunnels leading from Gaza to Israel, some of which have been used by Hamas to carry out attacks.
‘‘We started this operation to return peace and quiet to Israel... And we shall return it,’’ Netanyahu said after meeting with Hammond earlier Thursday in Israel.
In other violence, six members of the same family and an 18-month-old infant boy were killed when an Israeli airstrike hit the Jebaliya refugee camp early Thursday, according to Gaza police and health officials. Another airstrike on a home in the southern Gaza town of Abassan killed five members of another family, al-Kidra said.
Heavy fighting was reported along the border of central Gaza, according to Gaza police spokesman Ayman Batniji. Israeli troops fired tank shells that reached parts of the Bureij and Maghazi refugee camps, although no injuries were immediately reported. Clashes also erupted between Palestinian fighters and Israeli troops in the northern town of Beit Lahiya, Batniji said.
Israeli naval vessels meanwhile fired more than 100 shells along the coast of Gaza City and northern Gaza, the spokesman said, adding that rescue teams were unable to operate in the area because of the heavy fire.