Matt Easton, who came out gay during a valedictorian speech at LDS-owned Brigham Young University, said Monday that a classmate's suicide moved him to publicly announce his sexuality.

Brigham Young University's Honor Code declares “homosexual behavior” as “inappropriate” and prohibited. This includes “all forms of physical intimacy that give expression to homosexual feelings.” The Church of Jesus Christ of Latter-day Saints (LDS Church), which owns the university, has been a vocal opponent of same-sex marriage.

In his April 29 speech, Easton said that he was “proud to be a gay son of God.”

Appearing Monday on Ellen DeGeneres' daytime talk show, Easton said that being a gay student at BYU was “really scary.”

He also shared an emotional story about another gay BYU student.

“It was his last semester and he was in sort of the same situation that I was, and he decided to come out on Facebook, and because of the rhetoric and the response that he got from our community he actually ended up committing suicide,” Easton told DeGeneres. “He sat right in front of me, and I saw him do that, and I thought, ‘Is that my future? Is that what I’m headed toward?’ So I thought, maybe if I came out at graduation, maybe a student like me, a freshman, could say, ‘No, my future’s something brighter, something better. We can succeed. We can do what we want and accomplish our dreams.’ So that’s why I chose to come out there.”

“It's all about visibility,” DeGeneres told Easton. “What you did was pretty amazing, and especially to be here. You are going to be seen by a lot of people.”