After an escalating debate about the role of psychologists in military prisons, the American Psychological Association voted on Wednesday to reject a proposed change in policy that would have allowed members to treat detainees held at sites that do not comply with international human rights laws.

The proposed change would have reversed a 2015 determination by the association that prohibited such work, effectively blocking military psychologists from sites like the military detention facility at Guantánamo Bay, Cuba, maintained by the United States.

That decision followed revelations that in the early 2000s the association had finessed its ethics guidelines so that psychologists could aid interrogations by suggesting lines of questioning, for example, or advising when a confrontation had gone too far or not far enough.

The A.P.A. still forbids psychologists from participating in interrogations. The newly rejected policy change simply would have permitted psychologists in uniform to provide therapy and counseling to detainees who asked for it.