At least 15 people are dead and dozens who were seeking shelter are wounded after a UN school in the Gaza Strip was caught in the crossfire of another day of heavy fighting between Israel and the territory's Hamas rulers.

Palestinian officials, as well as the Palestinian Red Crescent, said Israeli tank shells had hit the school compound. The Israeli military said Hamas had launched rockets that fell in the area and 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 UN facilities," Israeli military spokesman Lt. Col. Peter Lerner said. The military had urged the UN and the Red Cross to evacuate the school for three days leading up to the incident, he said.

The UN said the strike occurred as staff members were trying to arrange a humanitarian pause in the hostilities so they could evacuate the compound in the northern town of Beit Hanoun.

Kamel al-Kafarne, who was in the school, said that the UN 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 UN facility has been hit in fighting between Israel and Palestinian militants in Gaza, since the Israeli operation began July 8. UNRWA, the Palestinian refugee agency, has said it has found militant rockets inside two vacant schools.

UN staff among casualties

The UN said officials were trying to get everyone out of the school when it was hit. Agency spokesman Chris Gunness said the UN had asked the Israeli military for a lull in fighting to allow for the school's evacuation but did not hear back.

UN Secretary-General Ban Ki-moon said UN 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 UN premises" and protect humanitarian workers. He said more than 100,000 Gazans have sought refuge in UNRWA facilities. 

Mideast Israel Palestinians

Palestinian children, wounded in a strike on a compound housing a UN school in Beit Hanoun, in the northern Gaza Strip, cry as they lie on the floor at the emergency room of the Kamal Adwan hospital in Beit Lahiya on Thursday. (Lefteris Pitarakis/Associated Press)

"Today's attack underscores the imperative for the killing to stop — and to stop now," Ban said during a visit to Iraq.

At an earlier news conference with U.S. Secretary of State John Kerry, the UN chief said the deteriorating situation is "unacceptable" and "intolerable." In a pointed message to all parties in the conflict — Israelis, Hamas and Palestinians — Ban said "it is morally wrong to kill your own people."

"The whole world has been watching, is watching, with great concern. You must stop fighting, and enter into dialogue. Whatever grievances you may have, this is wrong. Why are you continuing to kill people? There are many other ways to resolve this issue without killing each other."

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."

The attack on Beit Hanoun was likely to increase pressure on international diplomats shuttling around the region in an effort to broker a ceasefire.

Truce deal could let Palestinians enter Egypt

Days of feverish negotiations appeared close to an agreement early Friday that would allow a week-long pause in the fighting while regional officials broker new talks between Hamas and Israel toward a lasting cease-fire. Details of the agreement, first reported by Israeli media, would let Israeli forces remain in Gaza to continue destroying Hamas's tunnel network.

The deal could also let more Palestinians living in Gaza enter Egypt at the Rafah border crossing where their access is currently limited. The humanitarian pause in fighting could begin this weekend, and would coincide with the Monday start of Eid al-Fitr, the celebration that marks the end of the holy Muslim month of Ramadan.

MIDEAST-GAZA/

A Palestinian sits among the wreckage of her street after explosions destroyed several homes in the area. (Suhaib Salem/Reuters)

A senior U.S. official who participated in the talks cautioned that negotiations were continuing into early Friday, and that no agreement had yet been reached. The official described a range of ideas that represented proposals and demands from all sides involved. The official was not authorized to be named in discussing the negotiations and spoke on condition of anonymity.

Meanwhile, violence spread to the West Bank, where thousands of Palestinians protesting the Gaza fighting clashed with Israeli soldiers late Thursday in Qalandia, near the West Bank city of Ramallah. At least one Palestinian was killed and dozens were injured, a Palestinian doctor said.

The strike also came on a day of heavy fighting throughout the Gaza Strip as Hamas militants stuck to their demand for the lifting of an Israeli and Egyptian blockade amid international efforts to broker a ceasefire.

Six members of the same family and an 18-month-old infant boy were killed when an Israeli airstrike hit the Jebaliya refugee camp in the early morning hours, according to Gaza police and health officials. Twenty others were injured in the strike, they said, and rescuers were digging through the rubble of flattened homes, looking for survivors.

Possible war crimes committed: UN

An airstrike on a home in the southern Gaza town of Abassan killed five members of another family, said Gaza health official Ashraf al-Kidra. Abassan is near Khan Younis, in an area that saw intense fighting on Wednesday.

The 16-day conflict has claimed the lives of more than 700 Palestinians, most of them civilians, Palestinian health officials say. Israel has lost 32 soldiers, all since July 17, when it widened its air campaign into a full-scale ground operation it says is aimed at halting rocket fire from Gaza and destroying a sophisticated network of cross-border tunnels.

Two Israeli civilians and a Thai worker in Israel have also been killed.

Israeli Prime Minister Benjamin Netanyahu made no reference to the ceasefire 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 at a joint appearance with visiting British Foreign Secretary Philip Hammond.

UN High Commissioner for Human Rights Navi Pillay said on Wednesday that there was "a strong possibility" that Israel was committing war crimes in Gaza, where medical officials say most of those killed were civilians.

Pillay also condemned indiscriminate Islamist rocket fire out of Gaza, and the UN Human Rights Council said it would launch an international inquiry into alleged violations.

A furious Netanyahu denounced the inquiry as a "travesty."

"The HRC should be launching an investigation into Hamas's decision to turn hospitals into military command centres, use schools as weapons depots and place missile batteries next to playgrounds, private homes and mosques," he said.

With files from CBC News and Reuters