When Matt Easton started thinking about the valedictory speech he would give at his graduation ceremony at Brigham Young University, he didn’t initially think he’d announce to a packed auditorium full of students from the College of Family, Home, and Social Sciences that he is gay.

And he certainly didn’t think his speech would go viral.

Instead, he started with a deliberate approach. He watched past speeches online. He realized those that were the most memorable and inspirational came from people who were authentic and shared a part of themselves.

It made him think: What was his story?

“One thing that marked my time at BYU has been learning and coming to terms with my identity,” he told The Salt Lake Tribune. “How can I incorporate that as part of my graduation speech?”

He thought more about how declaring his sexual identity on his graduation day at the university owned by The Church of Jesus Christ of Latter-day Saints could help give a voice to people who felt like they may have been “a little left behind” at BYU.

So at his college’s commencement ceremony Friday, the 24-year-old Utah native and lifelong Latter-day Saint stood at the podium and declared: “I stand before my family, friends and graduating class today to say I am proud to be a gay son of God.”

It was perhaps one of the most frightening things he could have done, he recalled in an interview Monday.

Telling the world he is gay was a deeply personal declaration, one that he struggled to accept himself during his years at BYU. And there were family members in the audience that day to whom he had not yet come out.

“Ultimately, as soon as I got up there and I was giving the speech, it felt right,” he said. “I’m doing this for me. I’m doing this for my LGBT friends and all the people at BYU who deserve to be heard. I’m glad I did it.”

Easton’s announcement was a surprise to one of his sisters, he said, who recorded video of his speech that was later posted online. In that video, she lets out a whoop as the auditorium bursts into cheers.

Easton said it was overwhelming to see that response, to watch some of his fellow students stand up with him.

“It was amazing,” he said. “It was awesome. There are few times in my life that I have felt solidarity and support, especially from the last group I expected it from.”

His faith teaches that same-sex attraction is not a sin but that acting on it is. The church earlier this month reversed a controversial policy that deemed same-sex married couples “apostates” and generally barred their children from baby blessings and baptisms.

BYU’s stringent Honor Code forbids “not only sexual relations between members of the same sex, but all forms of physical intimacy that give expression to homosexual feelings.”

Recently, the school’s Honor Code Office has been criticized for investigating and punishing students, particularly LGBTQ ones, who reportedly violated the strict code of conduct. Hundreds of students, including Easton, gathered at the Provo campus weeks before graduation to protest how BYU enforces its Honor Code.

BYU leaders were not surprised by Easton’s speech — every word was approved ahead of time, he said. Easton was worried that BYU might not approve what he wanted to say, but the university gave him the go-ahead with no changes.

The video of Easton’s graduation speech has spread quickly online, picked up by national news outlets, and garnered admiration from celebrities such as Kristin Chenoweth (who took some heat from LGBTQ advocates late last year for performing with the church’s Tabernacle Choir at Temple Square), Ellen DeGeneres and Jamie Lee Curtis.

There has been some criticism, he said, some who say he went too far and others who told him he didn’t go far enough. But Easton said he has no regrets.

“I’m happy,” he said. “And I hope, hope, hope that my speech can open up pathways to other queer Mormons for more progress to be made on BYU’s campus.”

Easton grew up in Cottonwood Heights and knew in high school he wanted to go to BYU — a bit of rebellion against his parents, who are both University of Utah fans. But before coming to Provo, he spent two years serving a church mission in Australia.

After leaving college with a bang last week, Easton is already gearing up for the next stage in life. He starts a job at a Salt Lake City data analytics firm later this week — but he said he’ll probably go back to school for his master’s degree or a doctorate.

“It’s not the end for me,” he said.