Four Israeli hostages were rescued, with hospitals in Gaza saying scores of Palestinians were killed.