Israel withdrew most of its ground troops from the Gaza Strip on Sunday in an apparent winding down of the nearly monthlong operation against Hamas that has left more than 1,800 Palestinians and more than 60 Israelis dead.

Even as Israel said it was close to completing its mission, heavy fighting raged in parts of Gaza, with at least 10 people killed in what U.N. and Palestinian officials said was an Israeli airstrike near a U.N. shelter. The United States lashed out at Israel, saying it was “appalled” by the “disgraceful” attack.

And with Hamas officials vowing to continue their fight, it remained uncertain whether Israel could unilaterally end the war. […]