Israel and Hamas agreed to a ceasefire deal to pause the war in the Gaza Strip, multiple officials announced on Wednesday, raising the possibility of winding down the deadliest and most destructive fighting between the bitter enemies.