The Israeli prime minister’s announcement came one hour before the ceasefire deadline and after Israeli forces had already started withdrawing from areas in Gaza.