LOS ANGELES — George Takei, who as helmsman Sulu steered the Starship Enterprise through three television seasons and six movies, has come out as a homosexual in the current issue of Frontiers, a biweekly Los Angeles magazine covering the gay and lesbian community.

Takei told The Associated Press on Thursday that his new onstage role as psychologist Martin Dysart in “Equus,” helped inspire him to publicly discuss his sexuality.

Takei described the character as a “very contained but turbulently frustrated man.” The play opened Wednesday at the David Henry Hwang Theater in Los Angeles, the same day that Frontiers magazine featured a story on Takei’s coming out.

The current social and political climate also motivated Takei’s disclosure, he said.

Takei, a Japanese-American who lived in a U.S. internment camp from age 4 to 8, said he grew up feeling ashamed of his ethnicity and sexuality. He likened prejudice against gays to racial segregation.

“It’s against basic decency and what American values stand for,” he said.

Takei joined the “Star Trek” cast in 1966 as Hikaru Sulu, a character he played for three seasons on television and in six subsequent films. He received a star on the Hollywood Walk of Fame in 1986.

A community activist, Takei ran for the Los Angeles City Council in 1973. He serves on the advisory committee of the California Civil Liberties Public Education Program and is chairman of East West Players, the theater company producing “Equus.”