Israel and Palestinian militants agree to a cease-fire in Gaza