Israel and the Islamic Jihad militant group in the Gaza Strip agreed to an Egyptian-brokered cease-fire late Saturday, ending days of fighting that left dozens dead.