GAZA CITY — United Nations officials accused Israel of violating international law after artillery shells slammed into a school overflowing with evacuees Wednesday, an attack that Palestinian and U.N. officials said killed at least 20 people and wounded dozens as they slept.

It was one of the worst mass-casualty incidents of the three-week war. The building was the sixth U.N. school in the Gaza Strip to be rocked by explosions during the conflict.

Israeli officials said they were trying to determine who was responsible for the bloodshed. In past incidents, the Israeli military blamed errant rocket or mortar fire by Gaza militants for explosions at U.N. schools — or said the blasts were under investigation.

The U.N. Relief and Works Agency (UNRWA), which operated the school-turned-shelter in the Jabalya refugee camp, said it had gathered evidence, analyzed bomb fragments and examined craters after the attack. Its initial assessment was that three Israeli artillery shells hit the school where 3,300 people had sought refuge.

“I condemn in the strongest possible terms this serious violation of international law by Israeli forces,” said Pierre Krähenbühl, the UNRWA commissioner-general. “This is an affront to all of us, a source of universal shame. Today the world stands disgraced.”

The strikes continued even after condemnation for the Israeli shelling of a U.N.-run school sheltering evacuees from the Gaza conflict that killed at least 16 people and wounded dozens of others as they slept, according to Palestinian health officials and the U.N. agency in charge of the school.

Aug. 2, 2014A picture taken from inside a car in the village of Umm Al-Nasser, in the northern Gaza Strip, shows Palestinians in a car loaded with their belongings as some families return home. The Israeli army informed residents of Beit Lahiya, in northern, Gaza that it was “safe” to return to their homes, and witnesses said troops were seen leaving the area.Marco Longari/AFP/Getty Images

Satellite images released by the United Nations show the impact of Israeli strikes on structures in Gaza. One of the most ravaged areas is the Shijaiyah neighborhood in the southeastern part of Gaza City.

One of the survivors said she had no doubt who was at fault for the barrage.

“There were five shells, one after the other. We were a clear target,” said Hannah Sweilem, 33, who was in the shelter with her husband and eight children. “If the Israelis say it was a mistake, they are lying.”

The Israeli military said Hamas and other militant groups are fighting in residential areas and using civilians as human shields.

Lerner said that several previous high-profile attacks blamed on Israel, at Gaza City’s Shifa Hospital and the Al-Shati refugee camp, were actually blunders by Hamas, whose rockets and mortars were falling short of their targets in Israel.

Hidden caches of rockets have been discovered at three U.N. schools in Gaza since the conflict began, and the refugee agency has accused unnamed groups of putting civilians at risk. “We call on all the warring parties to respect the inviolability of U.N. property,” UNRWA spokesman Chris Gunness said in a statement Tuesday, after weapons were found at one such facility.

Mounting casualties

Gaza Health Ministry officials said that more than 105 people were killed in Israeli strikes Wednesday and that more than 400 were injured as Israel pressed ahead with its escalated campaign against the coastal enclave.

The Palestinian casualty toll rose to at least 1,340 killed and about 7,200 injured, Gaza health officials said. Many of the casualties have been civilians, including about a third who are children, according to the United Nations.

Israel has lost at least 56 soldiers in the conflict, its largest toll since its 2006 war in Lebanon. Mortar and rocket attacks from Gaza also have killed two Israeli civilians and a Thai worker.

Israeli Prime Minister Benjamin Netanyahu warned his country in a televised address Monday evening to be prepared for a prolonged campaign against Hamas. Israel has said it cannot stop until it dismantles a network of tunnels that are used by militants to infiltrate into Israel from Gaza.

Witnesses at the Jabalya Primary School for Girls said the shelling Wednesday struck a classroom where about 50 people, mostly women and children, were sleeping. The room’s roof was ripped apart.

Most of the dead, however, were young men who had woken for the traditional Muslim dawn prayer, said Moen al-Masr, a doctor at the Kamal Odwan hospital.

Said Allah al-Bes, 33, who was seeking refuge at the school with his wife and three sons: “We found people torn to pieces. It was like hell.”

Bes and his family went to the U.N. facility after an earlier attack on a U.N.-run school in Beit Hanoun. “We have learned no place is safe in Gaza,” he said.

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

Sudarsan Raghavan has been The Post's Kabul bureau chief since 2014. He was previously based in Nairobi and Baghdad for the Post.

William Booth is The Post’s Jerusalem bureau chief. He was previously bureau chief in Mexico, Los Angeles and Miami.

Ruth Eglash is a reporter for The Washington Post based in Jerusalem. She was formerly a reporter and senior editor at the Jerusalem Post and freelanced for international media.

Comments our editors find particularly useful or relevant are displayed in Top Comments, as are comments by users with these badges: . Replies to those posts appear here, as well as posts by staff writers.

To pause and restart automatic updates, click "Live" or "Paused". If paused, you'll be notified of the number of additional comments that have come in.

Comments our editors find particularly useful or relevant are displayed in Top Comments, as are comments by users with these badges: . Replies to those posts appear here, as well as posts by staff writers.