Israel agrees ceasefire with Hamas in Gaza after hundreds of deaths