The attack shattered a ceasefire with Hamas and threatened to fully reignite the 17-month-old war that has already killed tens of thousands of Palestinians and caused widespread destruction.