JERUSALEM — The Israeli military on Sunday threatened disciplinary action against a group of veterans and active reservists of a secretive military intelligence unit who declared that they would no longer participate in surveillance activities against the Palestinians.

Dozens of other veterans and reservists from the unit came to its defense and expressed outrage at their colleagues’ public act of refusal.

The protest and counterprotest exposed some of the complexities of life in Israel, where most 18-year-olds are conscripted for up to three years of service, and the episode set off an impassioned debate that had far more to do with the nature of military service and the selective refusal of duties than with the concerns raised by the would-be whistle-blowers about the treatment of the Palestinians under occupation.

Officials and politicians from the right and the left harshly criticized the 43 veterans of the elite Unit 8200, who lodged their protest in a letter sent Thursday night to their commanders as well as to Israel’s prime minister and army chief. The letter was made public on Friday. They wrote that they refused to continue to be “tools” of Israel’s military rule in the occupied territories, that the surveillance work they had been required to perform made “no distinction between Palestinians who are and are not involved in violence” and that information collected “harms innocent people” and “is used for political persecution.”