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