Israel kept thousands of Palestinians from returning to northern Gaza on Sunday as it accused Hamas of violating a fragile ceasefire by changing the order of hostages it has released.