The withdrawal marks the initial step in the phased truce and hostage-release deal brokered between Israel and Hamas, with mediation from Qatar, Egypt, and the United States.