Texas Governor Rick Perry, a Republican, on Thursday said he “stepped in it” when he recently compared being gay to alcoholism.

Last week, during an appearance in San Francisco, Perry was asked whether he believes being gay is a disorder.

“Whether or not you feel compelled to follow a particular lifestyle or not, you have the ability to decide not to do that,” Perry answered. “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.”

(Related: Rick Perry compares being gay to an alcoholic.)

At a lunch sponsored by the Christian Science Monitor, Perry said that he should have answered the question differently.

“I got asked about an issue, and instead of saying, 'You know what, we need to be a really respectful and tolerant country, and get back to talking about, whether you're gay or straight you need to be having a job, and those are the focuses I want to be involved with,' instead of getting – which I did, I readily admit, I stepped right in it,” Perry said.

Despite facing heavy criticism, Perry has defended his analogy. During an appearance on CNN's Crossfire, he refused to say whether he believes being gay is a disease, like alcoholism.

(Related: Jon Stewart mocks Rick Perry; Says being a Texas Republican is a choice.)