Imam Muhsin Hendricks gets ready for the start of the Jumu'ah prayer at the Inner Circle People's mosque Mosque, in Wynberg in Cape Town. (Rodger Bosch/AFP/Getty Images)

Imam Muhsin Hendricks gets ready for the start of the Jumu'ah prayer at the Inner Circle People's mosque Mosque, in Wynberg in Cape Town. (Rodger Bosch/AFP/Getty Images) Source: Rodger Bosch/AFP/Getty Images

I was in crisis. I fasted for 80 days. I vowed I wouldn't stop fasting until Allah gave me a sign and told me what he wanted me to do with my life.

I was born in a very orthodox Muslim family in Cape Town, South Africa in 1967. My mother was a teacher in the mosque, which was a stone throw from our house. My father was a spiritual healer. My grandfather was the imam of the mosque.

My grandfather was a very stern and unyielding personality. Everyone was afraid of him. I remember when I was little, he used to force me to eat with my right hand and would tie my left hand behind my back, because it was the Muslim thing to do eat with your right hand. It felt really cruel at the time.

I wouldn't dare to recite the Quran wrong in front of Grandfather. You need to behave in public at all times. You needed to be an example of a good Muslim 'because you are the grandson of the imam'. [We wouldn't] dare to do anything wrong, because he could come on the street to cane you in front of everyone.

I had the opportunity to learn Quran and hadith by heart from childhood. I was forced to listen all of Grandfather's lectures.

The unfortunate thing as I was growing up was there were no support structures. I couldn't even speak to my mother, who I was closest with, about my sexual orientation.

It was very much something I needed to figure out on my own. The journey began when I went to pursue religious studies in Pakistan at the age of 21.

I thought, ‘I just need a hiding place’. I was in crisis.

During my first year at the University of Islamic Studies, in Karachi, Pakistan, I was very challenged by the teachings. I didn't really understand (orthodox) salafi teaching. A lot of the times I was wrestling with all these questions, saying, "That's not what I'm understanding the Quran is saying". I was almost thrown out of school because of it! It was this personal issue all the time with the Quran and being angry with God and not wanting to pray because I had lost all sense of hope.

It's only when I was six years into marriage with a woman who I married in Cape Town in 1991 - my wife who is the mother of my three kids - things changed. In my third year I started to become depressed because of having to play this double role. By this time, we were sleeping in different rooms.

It took a lot of courage for me to get to the point where I could tell her: "Look this is not working. We are hurting each other."

I went to stay at a friend's farm in Cape Town. I thought, ‘I just need a hiding place’. I was in crisis. I fasted for 80 days. I vowed I wouldn't stop fasting until Allah gives me a sign and told me what he wanted me to do with my life.

On the 80th day of fasting I broke my fast after having a dream with my father in it. The dream was so profound. It was a dream about my deceased father. I had a conversation with him and asked him about my sexual orientation and he could not understand why this was an issue for me when my sick mother should have been my priority. The overwhelming sense I got from the dream was that sexual orientation was a non-issue in the spiritual world. I decided I've got all the answers now. I've wrestled with the Quran. I've made peace with it and I'm coming out.

I was no longer comfortable living a double life and hiding my true identity. It felt like a slow death.

My journey back to Islam has made me realise the indiscriminately compassionate nature of Allah, and that if we are vicegerents of Allah on earth, then we would have to embody the qualities of Allah such as compassion, peace and justice. Justice for me begins with authenticity to myself even if others may perceive me as weak or vulnerable. I was no longer comfortable living a double life and hiding my true identity. It felt like a slow death. It was the desire for personal justice and authenticity that forced me to take a bold step and face the possibility of being ostracised or even killed.

I went to the South African papers in 1998. A journalist came out and recorded my whole story. I needed the world to know that it was okay to be queer and Muslim and that it was through my struggle to reconcile my sexual orientation with Islam that I came to discover Allah. There were headlines everywhere: "Queer imam comes out of the closet!" I thought: "OK God, if I am going to meet you at this point, because they might kill me, at least I've been authentic."

When I came out, I included a hotline number to the press articles. I had about 150 calls. I was worried something was going to happen to me. But 80 per cent of the calls were positive. Some of them from queer Muslims, women who suspected their husbands were queer or mothers waiting for their kids to come out. There were even two imams from South Africa's Islamic judicial council who said, "We are not able to say this publicly, but we admire what you are doing."

It gave me hope that there is possibility for change in this community.

Now I teach the value of authenticity, because that moment actually opened up a whole new path for my work as an activist.

I've been through hell and back and if this means it is the end of our relationship, then so be it.

After years of resenting my grandfather as the villain of the story, I could see the blessing in it. I could forgive my grandfather. Everyone has their own understanding of compassion, and I suppose to my grandfather, being stern and showing tough love was his understanding of compassion.

So what looked like torture at the time, turned out to be Allah's compassion and now that I understand the reason behind my experience with my grandfather. All the values I learnt from my mother and my grandfather, I could now use as tools within my activism.

The only person I was worried would ostracise me was my mother. It took my mother 10 years to accept my sexuality. She said: "I heard you were divorced. I said yes." She said "I heard you were divorced because you are.." She couldn't finish the sentence. I finished "gay". It took a lot of courage for me to say that to my mother. She collapsed.

I thought "Oh no, I've killed my mother!" The next morning she came to my room and said, I must be jinxed and needed to be cleansed. I stopped her. Nobody ever did this, because my mother ruled with an iron fist. I said to her: "I am not prepared to go through any more torture. I've been through hell and back and if this means it is the end of our relationship, then so be it."

She couldn't understand how I could possibly have that kind of conversation. She knew at that point it was serious. Afterwards she asked me to share my research with her. When my mother passed 10 years later in 2009, I was the only one at her bedside while she was in hospital in the last week before she died. we got to talk about what kind of mother she'd been to me and what kind of son I'd been to her.

At her deathbed she said: "I may never understand homosexuality. But I understand the kind of son I brought into this world. That is my responsibility towards you and one I will never retract myself from."

That's all I needed to know. It gave me strength to go into the world. Everything else, all the critics, are just water off my back.

As told to Sarah Malik.

Imam Muhsin Hendricks is the founder of the Compassion-centred Islam Network, the Al-Ghurbaah Foundation and the Al-Ghurbaah inclusive mosque in Cape Town, South Africa. He has been a queer imam and activist for the last 22 years. He presented an address at Sydney University earlier this month titled: "Reading the Quran Through a Compassionate Lense", hosted by Sydney Queer Muslims, Muslim Collective and Institute for Australian and Islamic Studies (IAS).

He also conducts training and workshops through Al-Ghurbaah Foundation and was previously the founder and executive director of the Al-Fitrah Foundation.

Watch his full address here:

The Mardi Gras Live Stream will be available to watch from Saturday, March 2 on SBS.