A 24-year-old university graduate has been praised for his bravery after using his valedictorian speech at a Mormon university to come out as gay publically for the first time.

Matt Easton, a graduating student at Brigham Young University (BYU) in Utah, told the audience on Friday that he was "proud to be a gay son of god", eliciting cheers and claps from his classmates.

"Four years ago it would have been impossible to imagine that I would come out to my entire college, it is a phenomenal feeling," he said.

Facebook

"And it is a victory for me in and of itself."

BYU is owned by The Church of Jesus Christ of Latter-Day Saints - informally known as the Mormon Church - and is the religion's most prestigious academic institution.

READ MORE Teenager comes out as gay in Sydney Catholic school assembly

Up until last year, the church classified anyone in a same-sex religion as apostates - someone who renounces religion - and still considers same-sex marriage to be a "serious transgression".

I am feeling overwhelmed by the reaction to my words today (in the best way possible!) Thank you to all those who have expressed love and support. It means everything ❤️🌈 — Matty Easton (@easton_matty) April 27, 2019

Accordingly, the university's Honor Code states that "homosexual behaviour is inappropriate".

"Homosexual behaviour includes not only sexual relations between members of the same sex but all forms of physical intimacy that give expression to homosexual feelings," the policy reads.

"I hope that my story can serve as a reminder that BYU has given us the foundation to fix difficult problems, both secular and spiritual," Mr Easton's speech continued.

A valedictorian. A hero of faith and family. A “deer” boy. ( watch the clip) a DEAR boy. A good man. Everything we would want in a son, sister, father, mother. Just WOW! ⁦@freemomhugs⁩ https://t.co/PVjhfoOtcZ — Jamie Lee Curtis (@jamieleecurtis) April 29, 2019

"I am not broken, I am loved and important to the plan of the great creator. Each of us are."

Celebrities and politicians have since come out in support of the 24-year-old, describing him as a "hero of faith and family".

"A good man. Everything we would want in a son, sister, father, mother. Just WOW," actor Jamie Lee Curtis wrote on Twitter.

Meanwhile, talk show host and LGBTIQ+ advocate Ellen DeGeneres said she was proud of the graduate.

I’m proud of you, Matty. ❤️ — Ellen DeGeneres (@TheEllenShow) April 29, 2019

Democratic presidential candidate Pete Buttigieg also praised Mr Easton and said he was planning to call him.

“I know that kid is going to make it easier for somebody else,” Mr Buttigieg, who is also gay, reportedly told BuzzFeed News.

“Imagine if you’re a terrified closeted kid in that audience at BYU and what it does for you to have that student lead that way.”

For his part, Mr Easton Tweeted that he was "overwhelmed" by the response to his speech.