Palestinians said an Israeli strike killed at least 22 people in a school sheltering displaced people in southern Gaza City on Saturday, while the Israeli military said the attack targeted a command centre of militant group Hamas.
The Gaza health ministry said most of those killed were women and children. The Hamas-run government media office said 13 children and six women were among the dead.
The military said it hit a Hamas command centre embedded in the compound that previously served as a school, repeating an accusation that the group uses civilian facilities for military purposes. Hamas denies that.
Reuters footage from the site showed blasted walls, wrecked and burnt furniture, and holes in the ceiling of one room as people tried to salvage what they could of belongings.
"The women and their children were sitting in the playground of the school, the kids were playing, and suddenly two rockets hit them," said one witness, Said Al-Malahi.
Some of the dead were wrapped in blankets and carried away on donkey carts, as ambulances transferred other bodies.
"I couldn't take it, I did not see a single man that is injured, it was all women and children, let the Arab countries rejoice, let them rejoice and clap for (Israeli Prime Minister Benjamin) Netanyahu and the United States of America," said another eyewitness, Ahmed Azzam, bitter that regional neighbours were not taking a tougher line against Israel.
In Rafah, in the southern Gaza Strip, the Gaza health ministry said four health workers were killed by an Israeli strike that hit ministry warehouses. Ambulance crews could not reach the dead or treat the wounded, it added.
In a statement, the Israeli military said forces, operating in Rafah since May, have killed dozens of militants in recent weeks and dismantled military infrastructure and tunnel shafts.
Israel's demand to keep control of the southern borderline between Rafah and Egypt has been a major sticking point in international efforts to conclude a ceasefire deal.
Hamas says it is focused on an agreement to end the war and get Israeli forces out of Gaza, while Israel says the war can only end once Hamas is eradicated. Another sticking point has been the specifics of an exchange of Israeli hostages for Palestinian prisoners held by Israel.