A Brigham Young University professor who has publicly acknowledged he is gay is leaving the school to teach at Weber State University in Ogden.

Thomas J. Matthews, 40, had taught in BYU's department of Spanish and Portuguese for five years. He will join WSU's Spanish department this fall."There are a lot of reasons why I'm leaving BYU," Matthews said Thursday. "Obviously, the most crucial one is that I'm gay and I'm out of the closet and BYU doesn't like it."

Brent Harker, director of BYU Public Communications, was surprised by the news of Matthews' resignation, but said, "his conduct was in keeping with our standards, and it was really his own struggle. It was his choice to make."

Though never officially asked to leave, Matthews recognized his presence at the school was uncomfortable for the administration. Matthews announced in October that he intended to leave BYU once he found another job.

While acknowledging his overall experience at BYU has been positive, Matthews said he was disappointed that many subjects are taboo there.

News of Matthews' sexual orientation was publicized in stories last summer.

"I am gay and I don't know that I can commit to living alone the rest of my life," Matthews had said. "As long as I stay at BYU, that is a requirement."

Matthews, who had been vocal about his celibacy, wasn't pressured by BYU administrators to leave, but did meet with then Associate Vice President Todd A. Britsch last June. Britsch requested the meeting after someone told a general authority of The Church of Jesus Christ of Latter-day Saints about Matthews' sexual orientation.

Matthews said he felt compelled to go public with the fact he is gay because otherwise he felt duplicitous.

Every time a student or colleague would ask when he intended to marry or how often he dated, he had to evade the question.

"I don't know if I would have come to this point anywhere else," Matthews said earlier. "There's an atmosphere of honesty here that I felt more dishonest than I might have elsewhere."