The study — presented at a psychiatry meeting in 2001, before publication — immediately created a sensation, and ex-gay groups seized on it as solid evidence for their case. This was Dr. Spitzer, after all, the man who single-handedly removed homosexuality from the manual of mental disorders. No one could accuse him of bias.

But gay leaders accused him of betrayal, and they had their reasons.

The study had serious problems. It was based on what people remembered feeling years before — an often fuzzy record. It included some ex-gay advocates, who were politically active. And it did not test any particular therapy; only half of the participants engaged with a therapist at all, while the others worked with pastoral counselors, or in independent Bible study.

Several colleagues tried to stop the study in its tracks, and urged him not to publish it, Dr. Spitzer said.

Yet, heavily invested after all the work, he turned to a friend and former collaborator, Dr. Kenneth J. Zucker, psychologist in chief at the Center for Addiction and Mental Health in Toronto and editor of the Archives of Sexual Behavior, another influential journal.

“I knew Bob and the quality of his work, and I agreed to publish it,” Dr. Zucker said in an interview last week. The paper did not go through the usual peer-review process, in which unnamed experts critique a manuscript before publication. “But I told him I would do it only if I also published commentaries” of response from other scientists to accompany the study, Dr. Zucker said.

Those commentaries, with a few exceptions, were merciless. One cited the Nuremberg Code of ethics to denounce the study as not only flawed but morally wrong. “We fear the repercussions of this study, including an increase in suffering, prejudice, and discrimination,” concluded a group of 15 researchers at the New York State Psychiatric Institute, where Dr. Spitzer was affiliated.

Dr. Spitzer in no way implied in the study that being gay was a choice, or that it was possible for anyone who wanted to change to do so in therapy. But that didn’t stop socially conservative groups from citing the paper in support of just those points, according to Wayne Besen, executive director of Truth Wins Out, a nonprofit group that fights antigay bias.