His comments came in an address to the Commonwealth Club of California, where he was brought into a discussion about a change to the Texas Republican Party’s platform that endorses so-called “reparative therapy” as a plank.

Perry, eyeing another presidential bid in 2016, said in response to a question that he did not know whether the therapy worked.

Then, according to an account in SFGate.com, Perry was asked whether he believes homosexuality is a disorder. He responded that, “whether or not you feel compelled to follow a particular lifestyle or not, you have the ability to decide not to do that.”

He continued, “I may have the genetic coding that I’m inclined to be an alcoholic, but I have the desire not to do that, and I look at the homosexual issue the same way.”

The comment, spreading on the Internet, drew a rebuke Thursday from the Human Rights Campaign, a group that promotes gay rights.

“Although he may not have the ‘genetic coding’ to think before he speaks, Rick Perry, M.D. should have a real conversation with actual doctors before voicing his expertise on these issues,” said Fred Sainz, vice president for communications at the Human Rights Campaign . “Every major mental health and medical organization in the country has condemned practices aimed at changing a person’s sexual orientation.”

Texas Democrats also took a shot, calling the comments “bigoted.” Texas Democratic Party Executive Director Will Hailer said the governor “should be ashamed of himself.