El-Farouk Khaki, co-founder of Unity Mosque, Toronto’s first LGBTQ mosque for the Queer-Muslim community, prays on Friday June 17 for the victims in the Orlando shooting. (Mark Blinch for the Globe and Mail)

The day after the Orlando gay nightclub shooting, Lali Mohamed and El-Farouk Khaki were walking past Church and Wellesley when they noticed a white man wearing an anti-Muslim t-shirt.

“It’s not Islamophobia if they really want to kill us,” it read. Crowds ignored the man as he walked along the street, smiling.

In the heart of Toronto’s gay village, Mr. Mohamed and Mr. Khaki felt quietly persecuted. They were part of the LGBTQ community reeling in the wake of a massacre rooted in homophobia. But they were also Muslim, a faith vilified because of the shooter’s radical views.

The Muslim community’s small but tight-knit queer circle here is grappling with a new-found visibility in the wake of an unspeakable tragedy. It’s ignited hope for a wider dialogue about the confluence of two misunderstood identities. It’s also made queer Muslims more vulnerable to homophobia and Islamophobia, sentiments that still fester in the city.

A 2015 Toronto police report found that more than 40 per cent of the 134 hate crimes reported in the city targeted either LGBTQ people or Muslims. LGBTQ people were most at risk for assault, while Muslims most often encountered harassment.

Muslims make up about 8 per cent of Toronto’s population, yet certain Western beliefs of an Islam that is violent, repressive and fanatical dominate the narrative. Following any mass shooting, the city’s Muslims nervously await details about the perpetrator and brace themselves for a backlash.

The paradoxical response, of understanding and retribution, reminds Mr. Khaki of a line in the Koran where God says, “With hardship comes ease.”

“What a way to get noticed,” Mr. Khaki said. “I don’t think queer Muslims have [ever] had this much attention on them. We went from being invisible to all of a sudden very visible.”

As the founder of the Salaam queer Muslim group, Mr. Khaki is one of the community’s most high-profile leaders. The human-rights lawyer spoke at a Toronto vigil for the Orlando victims on Sunday to a crowd of 2,000 people, and has been fielding calls from media clamouring for his insight.

Exhausted, Mr. Khaki barely had time to read the news in the days following the shooting. On a recent evening, he caught up on his e-mails and came across an article with images of the victims. He started to cry. “It was the first time I had taken a moment and paused and just felt it,” Mr. Khaki said.

People pray at Unity Mosque, Toronto's first LGBTQ mosque for the Queer-Muslim community, during a service and prayer for the victims in the Orlando shooting, in Toronto, Friday June 17, 2016. (Mark Blinch for the Globe and Mail)

Rahim Thawer felt a similar delayed reaction. He was at a week-long retreat outside of Parry Sound, Ont., when his dorm mate mentioned the shooting on Sunday morning. Mr. Thawer immediately assumed the shooter might be Muslim and, for hours, he avoided the news. “I’m at a point now where whether or not I read what people have to say, I feel in my body the response I’m going to have when I hear them say Islamophobic things.”

Mr. Thawer said he has learned over time that his sense of safety as a queer Muslim is “tentative.” Born and raised in Toronto, he found a safe community in the gay village when he came out at 21. But growing anti-Islam sentiment within the LGBTQ community has made him seek refuge elsewhere.

Queer Muslims are cultivating spaces in the city where their identities can co-exist. Most prominent is the Toronto Unity Mosque, an LGBTQ-friendly and gender-equal space for practising Muslims. Also known as the El-Tawhid Juma Circle, it has been a haven for queer Muslims deterred by the traditional teachings of their faith and those who don’t abide by the militant atheism of other queer communities.

“It’s such a joyous space,” Mr. Mohamed said. “Sometimes, right after prayer, people cry. I love seeing members of the community get something lifted from their shoulders. For the first time in my life, I can be my fullest self.”

Reports surfaced after the shooting that Mr. Mateen, married and the father of a young child, had frequented Pulse nightclub and was active on gay dating apps. Mr. Mateen’s father denied those claims, speculating to media that the sight of a gay couple kissing in Miami might have spurred his son’s rage.

Queer Muslims, in turn, have spoken out this week about the homophobia that is still rampant in the Muslim world. One mistake, Mr. Mohamed said, is assuming that all queer Muslims have a tough upbringing and struggle to reconcile their identities. “Muslims aren’t a monolith. There’s a real diversity in how we journey through Islam.”

Mr. Mohamed found clarity when he was 16 years old. Before that, services at mosque taught him homosexuality was a sin. The imams often pointed to the story of Lut in the Koran, which describes how the cities of Sodom and Gomorrah are destroyed with fire and brimstone. “'Why do you commit this lecherous act which none in the world has committed before? In preference to women, you satisfy your lust with men,” the scripture says. Some religious writers construe the destruction as God’s punishment for the homosexuality of its inhabitants.

Queer Muslims are cultivating spaces in the city where their identities can co-exist. (Mark Blinch for the Globe and Mail)

But the language is vague and, Mr. Mohamed learned, open to interpretation. When he read an English copy of the Koran for the first time at 16, Mr. Mohamed understood the story as a condemnation of sexual assault. “Immediately, I thought, this story isn’t about me,” he said. “I realized I could absolutely live my life as queer and Muslim.”

Mr. Thawer admitted to struggling with his faith, but found support in his family. His older brother, whom Mr. Thawer came out to at 19, visited an LGBTQ campus organization so he could be an ally. His parents took the news harder and worried about their son’s safety. “It’s taken time and there’s lots of progress. We have lots of family dinners and events now where they invite both me and my partner.”

Mr. Thawer acknowledged that young closeted Muslims might be more fearful of coming out in the wake of the shooting. But a “beautiful transition” is under way in Toronto that’s fostered a sense of hope, he said.

Less than two days before the shooting at Pulse, about 170 people gathered at The 519 on Church Street for Iftar, an annual dinner hosted annually by Mr. Khaki. All gender and sexual identities were welcomed and a third of the group this year did not identify as Muslim.

The dinner opened with a smudge ceremony to cleanse the room’s energy. An Indonesian member of the mosque played sacred Sufi music before the gatherers broke their fast. Chatter and laughter filled the room. “You can just be who you are and you’re not going to be judged and be told that anything about you is inappropriate,” Mr. Khaki said.

Just three days later, Mr. Khaki and Mr. Mohamed would encounter the man on the street wearing the anti-Muslim t-shirt.

“We always know what comes after these things. It’s always Islamophobia. It’s always racism,” Mr. Mohamed said. “That t-shirt on that man reminded me that there’s still so much work to do.”

Editor's Note: The original newspaper version and an earlier digital version of this article incorrectly referred to a dinner hosted by Mr. Khaki as taking place at the end of Ramadan. This digital version has been corrected.