The exchange rattled an uneasy truce between the two sides Israel and Gaza brokered after a spike in hostilities.