As Israel showed signs of scaling back its ground offensive in Gaza, its war from the skies continued Sunday, as an airstrike outside a U.N. school in southern Gaza killed at least 10 people. The bloodshed sparked some of the harshest U.S. criticism of Israel since the war began.

Capt. Eytan Buchman, a spokesman for the Israel Defense Forces, said the targets of the attack in the border city of Rafah were three Palestinian militants riding past the school on a motorcycle. “We identified a successful hit on the target,” Buchman said. “We definitely don’t target civilians or schools.”

But according to eyewitnesses and U.N. officials, an Israeli missile struck just outside the gates of the school. About 3,000 Palestinians were seeking refuge at the facility, and a crowd of civilians had gathered outside — children buying ice cream from a sidewalk vendor, and men and women purchasing food or cigarettes, witnesses said.

The missile hit the motorcycle, said the witnesses, and then crashed into the road. Shrapnel flew in every direction, slicing into more than 40 people and killing at least seven civilians, including a boy. Presumably, the three militants Israel had targeted died, too. A U.N. employee was among those killed, said Adnan Abu Hasna, a spokesman for the U.N. Relief and Works Agency, which is assisting more than 200,000 Palestinian evacuees at 90 schools in Gaza.

“There were bodies all over the ground, covered in blood,” recalled Muhamed Yafei, 45, an air-conditioner repairman who had been staying inside the school. Among the dead, he said, was the ice-cream vendor.

The youngest victim, Saqer Al-Kashif, 8, had walked outside to buy ice cream. He was severely wounded in the blast and later died of his injuries. His body, covered in a white shroud, was brought back Sunday afternoon to the school, where his father kissed his head before taking him to the cemetery.

U.N. Secretary-General Ban Ki-moon called Sunday’s attack a “moral outrage and a criminal act.” State Department spokeswoman Jen Psaki, in an unusually harsh statement, said that “the United States is appalled by today’s disgraceful shelling” and urged Israel to do more to “avoid civilian casualties” and to protect U.N. facilities.

“The suspicion that militants are operating nearby does not justify strikes that put at risk the lives of so many innocent civilians,” she added. The State Department called for “a full and prompt investigation of this incident” as well as of the recent shelling of other U.N. schools, Psaki’s statement said.

The language was tougher than previous U.S. government reactions to attacks on the U.N. schools in Gaza. Last week, the White House condemned the shelling of a U.N. school that had left at least 20 dead, but it did not initially blame Israel.

Sunday’s attack was the seventh on a U.N. school in the Gaza Strip in nearly a month of fighting.

Israel has not accepted responsibility for every assault, saying that some are under investigation or were caused by errant mortars or rockets fired by Hamas. U.N. officials have acknowledged discovering munitions in three of its schools since the conflict began.

Ashraf al-Kidra, a spokesman for the Gaza Health Ministry, said that at least 90 people were killed by Israeli strikes Saturday night and Sunday, mostly in Rafah, including nine members of a family. The Palestinian death toll in the conflict has risen to at least 1,806. Sixty-seven Israelis have been killed since the fighting began July 8, the vast majority of them soldiers.

‘An intolerable price’

Sunday’s bloodshed came as Israel said it had withdrawn most of its ground forces from Gaza but would continue its military operation in the coastal strip.

Prime Minister Benjamin Netanyahu had warned Hamas on Sunday night that it would pay “an intolerable price” for its assaults on Israel. He also indicated, however, that Israeli forces would reassess their mission after destroying Hamas’s tunnel networks.

In Netanyahu’s message, there were hints that Israel hopes to wrap up its Gaza campaign on its own terms, without brokering a truce with Hamas, much like Israel did in its last major ground incursion into Gaza 51 / 2 years ago.

Buchman, the Israel Defense Forces spokesman, said Sunday that Israel believed it was no more than 24 hours away from destroying the last known Hamas tunnel, but he would not confirm whether Israel intended to pull all its forces out of Gaza once that happened.

Israel said early Monday that it would observe a cease-fire for seven hours beginning at 10 a.m. in most areas of Gaza to facilitate the flow of humanitarian goods. But Israel said the pause would not apply in Rafah.

The partial pullback from Gaza reflected a shift of tactics for Israel, but analysts said it did not necessarily signal an approaching end to the conflict. Rather, they said, it was a recognition that ground troops had accomplished their mission and other goals can be more easily achieved from afar.

“The ground forces finished the job. They destroyed the tunnels. So there’s no point in keeping them there,” said Yosef Kuperwasser, former director general of Israel’s Ministry of Strategic Affairs. “But it’s not that we’re easing the pressure on Hamas. The pressure on Hamas is still there.”

Israel has shown no indication it will pause its campaign of fire from the air and the sea, as evidenced by Sunday’s attack near the U.N. school. Hamas, too, has given little indication it will yield, firing at least 55 rockets toward Israel on Sunday.

No sign of an endpoint

Meantime, by boycotting truce talks in Cairo on Sunday, Israel has demonstrated that it has no interest in pursuing a diplomatic solution following a string of broken cease-fires that Israeli officials blame on Hamas.

“Hamas’s plan was that they were going to get something as a reward for their rocket launches,” Kuperwasser said, adding that Israel had been prepared to discuss the opening of Gaza border crossings that Hamas has long sought. “But now we’re saying, ‘If we can't trust you in even a short-term cease-fire, there’s no point in discussing these broader arrangements.’ ”

With no diplomatic solution in sight, a battle that has already lasted far longer than two previous conflicts between Hamas and Israel could continue indefinitely.

There were unanswered questions Sunday about the death of an Israeli soldier who the military feared had been abducted by Hamas gunmen in a firefight Friday. The military later announced he had died in battle. The death shattered a 72-hour cease-fire in Gaza that many U.S. and U.N. diplomats had viewed as the best chance to bring the conflict to an end.

The unit of 2nd Lt. Hadar Goldin, which had been preparing to destroy a tunnel between Gaza and Israel, was ambushed by Palestinian militants, including a suicide bomber. Two Israeli soldiers were killed, and Goldin was thought to have been pushed back through the tunnel by the Hamas fighters.

Buchman said Israel had collected enough forensic evidence from the scene to determine that Goldin, 23, had died, but it was unclear exactly when. Other Israeli troops pursued the Hamas militants into the tunnel but could not locate Goldin or his apparent captors.

“We can’t confirm exactly how he was killed,” Buchman said.

Witte reported from Jerusalem. Ruth Eglash in Jerusalem and Islam Abdel Karim in Gaza City contributed to this report.