SAN FRANCISCO (KPIX 5) — Texas Gov. Rick Perry raised eyebrows during his appearance at the Commonwealth Club in San Francisco Wednesday night, when he compared homosexuality to alcoholism.

When taking questions at the InterContinental Mark Hopkins hotel on Nob Hill, Perry was asked whether he thought homosexuality was a disorder.

READ MORE: 1 Dead, 3 Hurt In San Jose Head-On Crash

RAW VIDEO: Rick Perry On Homosexuality

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

Read More:

READ MORE: Bodies Of Woman, Man Found Inside Vehicle In Pleasanton

A few people in the audience gasped when they heard the governor’s remarks.

Perry was appearing before the Commonwealth Club on Wednesday to talk about energy independence.

The Texas governor is in California as part of a trip to lure jobs and businesses to the Lone Star State. He also made an appearance in Sacramento, where he made a push for Tesla Motors to build their $5 billion battery factory in Texas.

In February, a federal judge struck down Texas’ ban on same-sex marriage, calling it unconstitutional. The ruling has been stayed pending an appeal.

MORE NEWS: Firefighters Keep Flames Away From Famed The Four Guardsmen Sequoias