As soon as Omar finished school, he left home and threw himself into Sydney's Oxford Street gay scene.

Key points: Being gay is illegal in a number of Muslim-majority countries

Being gay is illegal in a number of Muslim-majority countries Growing numbers of Muslim scholars are re-examining prohibitions on homosexuality

Growing numbers of Muslim scholars are re-examining prohibitions on homosexuality While Mardi Gras is a cause for celebration for some, not all are able to enjoy it

He had grown up in a traditional, Jordanian Muslim household in Castle Hill and attended a Christian school in the "Bible belt".

Neither were particularly conducive to embracing Omar's identity as a young gay man.

While his immediate family is aware of his sexuality, Omar's father does not acknowledge that he's gay and it has meant he doesn't speak with his brother.

"I rejected my faith because the community rejected me," he told the ABC.

But even being among the inner-city LGBT community presented new challenges.

"The queer community is exceptionally white on Oxford Street," Omar said.

"It brought a whole host of other problems like racism and xenophobia."

Rejection from all sides as a 'multiple minority'

Omar's story is not an uncommon one.

According to Nurul Huda, president of the community group Sydney Queer Muslims, reconciling Muslim and LGBT identities is a "major source of pain for most people".

"Gay people have been really badly abused," she said.

Hussein Hawli grew up in a Lebanese Muslim household in Western Sydney.

He told the ABC he was abused and later kicked out of home after coming out to family.

"They tried to beat the gay out of me," he said.

The pain of family rejection saw Hussein attempt suicide multiple times.

Today, Hussein has a successful career in marketing and sits on the board of several LGBT organisations.

Describing himself as a "triple minority: Lebanese, Muslim, and gay", he feels a responsibility to educate ethnic minority communities that "we're here. We're not any different to you."

Hussein Hawli sits on the board of several LGBT rights organisations. ( Supplied )

Sydney Queer Muslims, which started out as a clandestine support group on Facebook, works to promote welfare and mental health among their community.

"With all our activities, before we do anything, we think: how will this affect a 17-year-old gay kid in Bankstown?" Nurul said.

"We don't have lofty ideals about changing the [Muslim] community."

Nurul officiated the organisation in the wake of the Pulse nightclub attack in Orlando, Florida, in 2016 — then the worst mass shooting in US history.

Most of the victims were gay Latino men, murdered by a Muslim American of Afghan descent.

Lesbian, gay, bisexual, trans and gender diverse, intersex and queer communities have the highest rates of suicidal thoughts and suicide attempts of any group in Australia.

Pressures from within the Muslim community make mental health issues even more acute, Nurul said.

A mixed history of acceptance

While contemporary Muslim-majority societies lag behind on providing rights to LGBT citizens, alternative sexualities have played a significant role in Islamic history.

The Ottoman Empire decriminalised homosexuality in 1858, long before many countries in the West. Gay sex was illegal in Tasmania until 1997.

Thirteenth-century Persian poet Rumi, perhaps the most widely read Muslim author in the Western world, famously dealt with romantic, homoerotic themes.

Transgender people have long been met with tolerance and even played important cultural roles in countries such as Pakistan, Iran and Indonesia.

Pakistan allows people to identify as a 'third gender' on their national ID card. Its senate voted in favour of a bill to protect transgender rights in 2018.

Iran's then-supreme leader, Ayatollah Khomeini, issued a fatwa in 1987 in support of people's right to undergo gender realignment surgery.

Nevertheless, the growing influence of conservative Islam across much of the world has seen increased pressure on LGBT Muslims.

The death penalty is on the books for homosexuality in Saudi Arabia, Iran, Sudan and Yemen.

Punishments such as imprisonment and whippings may face LGBT people in many other Muslim-majority countries.

In Indonesia's ultraconservative Aceh province, for example, same-sex couples have been publicly caned.

The deeply conservative province of Aceh whips people for 'moral offences', including homosexuality. ( AP: Heri Juanda )

Exclusion from religious spaces

Change is slowly occurring in some parts of the world.

Despite rising anti-LGBT sentiment in Indonesia, Omar told the ABC he was able to reconcile his faith and sexuality after spending time with an "underground" LGBT Muslim group during an exchange program in the Muslim-majority South-East Asian country.

According to the US-based LGBT advocacy organisation Human Rights Campaign, a growing number of Islamic scholars are questioning orthodox teachings on same-sex relations and whether "a blanket condemnation of LGBTQ people is a misinterpretation".

"[Homophobia] contradicts everything that the Quran tells us about compassion, about social justice … there are no caveats," Nurul said.

"It doesn't say 'you have to be kind, except to gay people'."

Loading...

Imam Muhsin Hendricks founded South Africa's first gay-friendly mosque and has dedicated his career to creating safe spaces for Muslims who identify as LGBT.

"If we look at the current orthodox representation of Islam, we see that it excludes Muslims who are queer. It excludes them from religious spaces," he told a workshop in Sydney in 2018.

"The religious text, as we can see, is manipulated to promote homophobia and violence against queer people."

Imam Muhsin provides free counselling through Skype to LGBT people from Muslim backgrounds in Australia.

Nur Warsame, a Melbourne-based imam who came out in 2010, has campaigned to create LGBT-friendly Muslim places of worship.

The world's first Muslim LGBT festival was recently announced, with the UK charity Imaan hosting it in London in April.

Not everybody gets to enjoy Mardi Gras

"My first memory of Mardi Gras was when I was a kid and it was on TV … everyone freaked out in the room and changed the channel straight away," said Hussein, whose relationship with the event has become stronger over the past five or six years.

"It's a fantastic celebration of all sexual identities. It's exactly what we need."

Omar agreed, telling the ABC: "I find Mardi Gras beautiful because it's the one time when you can be yourself completely."

He will join the 'fag hags' float, which is "to celebrate LGBTQI allies", for the 10th year.

But for others it can be bittersweet.

People rehearse synchronised dancing ahead of Mardi Gras 2020 in Sydney's Prince Alfred Park. ( ABC News: Max Walden )

"For some it's a celebration. They meet their friends, they go on a float. It's a fun thing to do," Nurul said.

"Those who are in the closet will probably not participate or even watch it. The spectrum is quite wide."

While there are calls for Sydney Queer Muslims to have a float, Nur said they aren't yet ready to put one in the parade.

She fears the carnival atmosphere could undermine their message to the Muslim community that "we're just like you".

"One day we will, we just don't yet know what message we want to send out," she said.