Imam El-Farouk Khaki co-founded Toronto's first LGBTQ-friendly mosque, Unity Mosque, 10 years ago to allow lesbian, gay, bisexual, transgender and queer Muslims to attend prayers without having to hide their sexual orientation or gender identity for fear of discrimination.

“I wanted a Muslim space that welcomed all humans and celebrated human diversity, including gender and sexual diversity,” Khaki told NBC News. “I used to get angry going to the mosque, because I would often have to listen to irrelevant or ignorant sermons. When I go to Unity Mosque, I am happy.”

Imam El-Farouk Khaki co-founded Toronto's first LGBTQ-friendly mosque, Unity Mosque, 10 years ago. Daniel Ehrenworth

With no dress code for women, no gender segregation and women regularly leading Friday prayers, Unity Mosque’s progressive approach is a far cry from how many mainstream mosques operate.

“We welcome all peoples, of all genders, sexualities, gender expressions, abilities and faiths,” Khaki stressed.

While Khaki said Unity Mosque was one of the only explicitly LGBTQ-inclusive spaces he had heard of when it opened in 2009, he noted things are starting to change.

“More and more groups, communities and mosques that celebrate and embrace inclusion and diversity are forming,” he explained.

Khaki and other LGBTQ Muslims said these affirming outlets, which are sprinkled around the globe, are helping sexual and gender minorities reconcile their religion and their identity.

SCRIPTURE VS. INTERPRETATION

Gay Muslim scholar Scott Siraj al-Haqq Kugle has spent two decades researching LGBTQ issues in the Islamic faith and said many people are surprised to discover that Islam is not inherently condemning of LGBTQ people.

“The religion has been interpreted that way, but its scriptural sources are open to other interpretations,” Kugle, a professor of Middle East and South Asian studies at Emory University, told NBC News.

“The details are important,” he added. “In the Quran, there is no word that explicitly describes homosexual or transgender persons; the Arabic terms were invented after the Quran’s revelation, by medieval jurists and contemporary journalists, doctors and social critics.”

As there is no formal organized movement that represents all liberal or progressive Muslims and no network of liberal mosques across the U.S., Kugle believes the efforts of the smaller, more localized groups of progressive Muslims are often not fully considered in the conversation about LGBTQ rights and Islam.

“This often falls beneath the radar of journalists and social commentators, who are looking for formal movements that are equivalent to Protestant denominations or the Catholic Church,” Kugle explained.

“Liberal or progressive Muslims act in society mainly as individuals, not as a formal movement,” Kugle added. “For that reason, their effect is gradual and decentralized, impacting mainly their circle of friends, family and professional activities.”

Taylor Amari Little, now 20, said she had just started high school when she began to learn more about the Muslim community in the Detroit area.

“I just kept getting drawn to being around them and being close to anything that resembled Islam,” she said.

As a black, queer Muslim, Little said she initially felt that her queerness could disqualify her from practicing Islam.

“I didn’t think that God didn’t love me,” she explained. “It was the mainstream Muslim community’s projections upon me that sparked that anxiety and panic. I know I am supported by God, but am I supported by the Islamic community?”

Little, who is still in the Detroit area, is part of Advocates for Youth’s Muslim Youth Leadership Council, a group of Muslim-identifying young people from across the country working to advance progressive issues. She said participation in this group and conversations with progressive Muslim elders have helped her on her faith journey and to understand there are many different interpretations of Islam.

”Because of our different cultural backgrounds, traditions and experiences, there are many ways to practice Islam, but it’s really important to get a balance between searching for the things that unite us and the aspects that make us different,” she added.

FINDING ‘A MIDDLE GROUND’

Tugay Sarac was 13 when his father died eight years ago. In order to cope with his loss, he turned to his faith. But he said he struggled in balancing Islam and his sexuality.

“I thought I can't be Muslim and gay at the same time,” he said. “This went on for a few years until I went to the Ibn Rushd-Goethe Mosque, where I realized that it is actually possible to be Muslim and gay.”

Tugay Sarac is the LGBTQ coordinator of Ibn Rushd-Goethe Mosque, the only self-described liberal mosque in Germany. Courtesy of Tugay Sarac

Ibn Rushd-Goethe Mosque is the only self-described liberal mosque in Germany. Sarac, who now serves as the mosque’s LGBTQ coordinator, said it helped him “find a middle ground” between his religion and sexuality.

Founded in 2017 by Seyran Ateş, a lawyer and feminist activist, Ibn Rushd-Goethe Mosque not only permits women and men to pray together, but it also bans full-face veils, including the burqa and niqab.

Despite receiving a fatwa, or Islamic religious ruling, that condemned the mosque’s practice of men and women praying together, from the legal department of Egypt’s al-Azhar University, and hundreds of death threats since opening, Ibn Rushd-Goethe continues to champion its progressive form of Islam.

For Sarac, now 21, the mosque opened when he needed it most. As a closeted teenager he had flirted with extremist Islamic ideas, primarily as a means of diverting attention away from his sexuality. But the inclusive message he found at Ibn Rushd-Goethe helped him learn to accept himself.

“I know that many gay Muslims turn to radical ideas because they want to cure themselves from homosexuality,” Sarac explained. “Mosques like Ibn Rushd-Goethe can give people a place to be gay and Muslim.”

While many Muslim-majority nations have anti-LGBTQ laws on the books — where punishment could include imprisonment, caning or even death — attitudes toward LGBTQ people are progressing among Muslims in some Western countries.

According to a 2017 Pew Research Center survey of American Muslims, a majority (52 percent) believe society should accept homosexuality, compared with just 27 percent in 2007. And a new poll released in March by the Public Religion Research Institute found that 60 percent of American Muslims are in favor of laws that would protect LGBTQ people against discrimination in jobs, public accommodations and housing.

In the U.K., however, Muslims are less accepting of homosexuality. A 2016 ICM Unlimited survey found only 18 percent of British Muslims agreed that homosexuality should be legal in Britain.

‘INCLUSIVE AND RELEVANT’

Like Kugle, Imam Daayiee Abdullah, one of the first openly gay imams in the U.S., believes the prevalent view of homosexuality as a sin in current Islamic teaching is rooted in tradition, rather than scripture.

“Many traditions are locked into a particular time, place and culture — they're not necessarily appropriate for us today or for people who will be worshipping in 50 years from now,” Abdullah said.

Imam Daayiee Abdullah, founder of the Mecca Institute, is one of the first openly gay Imams in the U.S. Courtesy of Imam Daayiee Abdullah

In 2011, Abdullah created the LGBTQ-inclusive Masjid Nur Al-Isslaah, or Light of Reform Mosque, which was housed in a public library in Washington. Over the years, Abdullah has performed same-sex marriages, as well as interfaith marriages, and conducted an Islamic funeral ritual for a Muslim who died of AIDS complications.

“I went down to the morgue where the body was being held and performed the washing ritual, used a makeshift wrap and prayed,” Abdullah explained. “I didn't have the money to bury them, but I felt that every Muslim has the right to this spiritual service.”

After operating Masjid Nur Al-Isslaah for four years, Abdullah decided to focus on a more ambitious endeavor. In 2015, he opened the Mecca Institute, a progressive Islamic institute and online chaplaincy program. He hopes the institute will be operating 50 LGBTQ-inclusive mosques across North America by 2030.

“We have three students who are studying part-time, and we are training them to understand a Quranic interpretation that is inclusive and relevant for modern times,” Abdullah explained. “We strip out the cultural aspects and concentrate more on the spirit within the Quranic teachings.”

In addition to LGBTQ-inclusive mosques — like Toronto’s Unity Mosque, Berlin’s Ibn Rushd-Goethe and South Africa’s Masjid Ul-Umam — there are a handful of inclusive institutes and centers around the globe, like the Mecca Institute, that are working to expand mainstream Islamic theory to fully recognize LGBTQ worshipers, through advocacy and education. Chicago's Masjid al-Rabia, which was found in 2016, is another such example.

Imam Khaki of Toronto’s Unity Mosque applauded these affirming places of worship and community-building for broadening the conversation around what it means to be LGBTQ and Muslim.

“Chapter 49:13 of the Quran tells us that diversity and difference are part of God’s plan and should be celebrated,” he said. “We are trying to live it.”

FOLLOW NBC OUT ON TWITTER, FACEBOOK & INSTAGRAM