Israel’s military said it had “identified a terrorist cell that operated adjacent to the troops, posing an immediate threat to them”