A gay man and a straight woman who married to prove their commitment to the Mormon church and their "dedication to God" have announced they are divorcing.

Josh and Lolly Weed, from Utah, gained notoriety in 2012 when they revealed in a joint blog post that Mr Weed identified as gay, which his wife knew long before their marriage.

They said that despite having different sexual orientations, they still enjoyed an "extremely healthy and robust sex life" and that they had decided to get married because it was in keeping with what God expected of them.

Couples tie knot in Australia's first same-sex weddings

Now, after 15 years of marriage and nearly six years since their story went viral, the couple have written a new post explaining their divorce and have issued an apology to the LGBT community.

The couple, who have four daughters, also revealed that it was their "love for the LGBT+ community", Mr Weed's acceptance of himself as a gay man and the death of his mother which all contributed to their decision to divorce.

"Our marriage was absolutely beautiful but it contained an undercurrent of pain that we were not able to see clearly or acknowledge for many years, which made continuing it impossible," Mr Weed wrote.

"I have spent my entire life conforming to every standard of the The Church of Jesus Christ of Latter-day Saints (LDS) faith because I believed it was what God wanted me to do.

"I believed this because every mentor, every exemplar, every religious teacher, every therapist, every leader I ever grew up listening to and trusting told me that it was the only way I could return to live with God.

"There was an emphasis on 'perfect obedience' and yet, over the course of my lifetime, the list of things said by these trusted leaders about my sexual orientation was profoundly inconsistent and confusing."

Thousands march against Donald Trump in LGBT rights parade Show all 8 1 /8 Thousands march against Donald Trump in LGBT rights parade Thousands march against Donald Trump in LGBT rights parade A marcher hold a sign that reads "Love is Love is Love" on the National Mall with the Washington Monument in the background during the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade Marchers unfurl a huge rainbow flag as they prepare to march in the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade Marchers gather to hear speakers at the end of the Los Angeles LGBTQ #ResistMarch AP Thousands march against Donald Trump in LGBT rights parade Gil Mendez, of San Francisco, holds a sign to honor the victims of the shooting at the Pulse Nightclub in Orlando as he marches during the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade An demonstrator looks on as LGBT members and their supporters take part of the Equality March for Unity AFP/Getty Images Thousands march against Donald Trump in LGBT rights parade A marcher listens to speakers at the end of the Los Angeles LGBTQ #ResistMarch AP Thousands march against Donald Trump in LGBT rights parade LGBT members and their supporters take part of the Equality March for Unity AFP/Getty Images Thousands march against Donald Trump in LGBT rights parade A marcher mugs for the camera during the Los Angeles LGBTQ #ResistMarch AP

The official stance of the LDS faith is that there is a difference between same-sex attraction and homosexual behaviour, and simply having gay or bisexual urges is not a sin, and does not prohibit a person from participating in the Mormon church.

However, Mormons are also taught that sexual purity is a part of God's plan and that sexual relations can only be reserved for a man and a woman who are married and promise complete loyalty to one another.

Mr Weed also wrote that he lied to himself about the level of his attraction to his wife, both physically and romantically.

"When I held Lolly's hand and casually liked it, or kissed her and had a vague sexual stirring [because] two human bodies were doing the kissing thing, it was very easy to believe that those tiny stirrings were romantic or sexual feelings, or at least were some lesser approximation of those things," he added.

"I allowed myself to believe that there were levels of attraction and connection on a sexual and romantic level that weren't actually there."

Ms Weed added that she had always been "devastated" to know that her husband did not love her "the way a man loves a woman".

"We were best friends but he never desired me, he never adored me, he never longed for me," she wrote.

"We put forth a lot of effort and were 'mechanically' good at sex – and it did help us to feel intimate, and for a time that closeness did help us to feel content in our sex life – but I don't remember him ever looking at me with passion in his eyes.

"Josh has never looked at me with romantic love in his eyes. He has never touched me with the sensitive touch of a lover.

"Whenever he held me in his arms, it was with a love that was similar to the love of a brother to a sister."

But they said that the reason they felt the need to apologise to the LGBT community was because of the negative affect their story may have had on other LGBT Mormons, whether from within the faith or internally in their own minds.

"We're sorry to any gay Mormon who even had a moment's pause as they tried to make the breathtakingly difficult decision that I am now making – to love myself fully for exactly what God made me," Mr Weed wrote.

"We're sorry for any degree that our existence, and the publicity of our supposedly successful marriage, made you feel 'less than' as you made your own terribly difficult choices.

"And we're sorry if our story made it easier for people in your life to reject you and your difficult path as being wrong.

"We're sorry to any gay Mormon who received criticism, backlash or hatred as a result of our story."