A pilgrim deep in prayer at the Kaaba in Mecca, filmed covertly for A Sinner in Mecca.
Photograph: Supplied

“Islam is at war with itself, and I have fought hard not to be a casualty.” Vulnerable yet self-deprecating, film-maker Parvez Sharma sets out his position in the new autobiographical documentary A Sinner in Mecca, whichpremiered last week at HotDocs, North America’s largest documentary film festival. Parvez, who is gay and Muslim, has had death threats for making the film, leading to increased security at the festival screenings.

The film explores Sharma’s complicated relationship with Islam as he embarks on the hajj, the devotional pilgrimage to Mecca in Saudi Arabia, which all Muslims are required to make at least once in their lifetime. Sharma, who was born in India but is based in New York, sets out to answer the question: is it possible for someone like him to be a good Muslim? “I need evidence that my faith is strong enough to survive this journey,” he explains early in the film, which was recorded on a cameraphone and two smuggled-in cameras. Photography is forbidden at sacred sites on the hajj, while homosexuality is punishable by the death penalty in Saudi Arabia.

Yet as the film progresses from Sharma’s personal essay on the inner struggles of a gay Muslim to a political examination of Wahhabism’s hardline manipulation of contemporary Islam, audiences witness firsthand his intimate struggles of uncertainty and self-doubt against the backdrops of religious extremism, commercialisation and sectarian battles – all of which continue to poison modern understanding of Islam for Muslims and non-Muslims alike.

“If anything,” he says, “my faith seems to disappear in this very place.” What he confronts is “the frontline of Islam” – never-before-filmed streets dominated by peace-loving pilgrims, and a government-supported bastardisation of the religion that bears little resemblance to the faiths of most Muslims. It’s a Saudi Arabia never seen before on film, one that its secretive monarchy doesn’t want the world to discover.

With poetic simplicity, A Sinner in Mecca explores what it means to believe in the face of religious manipulation and government corruption. Sharma’s bravery is not that he is a gay man in Mecca, but that he is a Muslim questioning and reclaiming his faith from the authorities exporting it as violent conservatism. The voice he gives to the complexities of contemporary Islam remind us never to fall for the simplified narrative, especially one that forces you to look at a quarter of the world’s population through a singular lens.

Despite the extremists, the humanity and dignity of Islam’s majority continue to be the only things that will help its believers push the religion forward. Sharma’s film is both a delicately personal story and an urgent call to action, showing that reformation is not just phase on the path to modernity – it’s the only hope a faith has to save itself in an increasingly harsh world.

What was it like to return home to the States and re-enter everyday life after making this profound journey?

It was very difficult. I felt like I had been on another planet. That’s the kind of effect Mecca has on you. When I came back, I was haunted by dreams of the Kaaba [the sacred cuboid building in the middle of Mecca] and of how transformative it had been in my life. The Kaaba is essentially what gave me the strength during the hajj to keep carrying on. It’s a very harsh pilgrimage – it’s about faith, but it’s also about surrender.

Filming sacred sites is prohibited in Mecca, so you had to create this film undercover. What precautions did you take?

As far as safety goes, there wasn’t much I could do, except to go back into the closet – as a gay man, and as a film-maker. I just had to go with what I hoped was some kind of divine intervention that would allow me to do what I was going to do. I tried to be as discreet as I possibly could. A sequence from my first night at the Kaaba is an interesting example, because I rubber-banded the iPhone around my neck and just let it run. That space where you run around the Kaaba is a violent space, and no one has ever seen images of the Kaaba like that, from that close proximity.

At one point, you mention a fellow pilgrim who told you he was glad you can’t film in Mecca, because he doesn’t want the West to see what it really looks like.

It’s garish. It’s unforgivable what the Saudi government is doing. It’s a systematic, deliberate obliteration, and they’re carrying it out with great success. They’re building seven-star hotels and hugely expensive apartments all around the Kaaba, just diminishing the presence of this holiest structure in Islam. It’s a destruction of Islamic history, and it’s being carried out with a guillotine, with very few questions from Muslims around the world.

You talk in the film about being there with the Shia pilgrims, and how you’re all seen as infidels, because Shia Islam isn’t recognized by the Saudi government.

I felt a strange and unique affinity with the Shia pilgrims that were on the journey with me. I was afraid and I came out to my group leader as a Sunni. He said, “We Shia welcome you, but this were the other way around – a Shia trying to get into a Sunni hajj group – it would never happen.” I realised in a special way that I was one with these outliers of Islam, and that we shared our outsider status. It was a blessing, and I call it our hajj of defiance, because that is exactly what it is.

Do you feel pressure to address gay issues within Islam in your work?

I was done with homosexuality and Islam with my previous film [A Jihad for Love]. This is a film about the change that needs to happen within Islam. It’s a direct challenge that has never been mounted to the Saudi monarchy. It’s a call to action to all Muslims to take back singular authority over their faith. It’s only the believers who have the power to transform the religion – and the transformation is urgent. We’re losing time, and we need to be able to do this fast, before the destruction becomes complete.

So if real change has to come from within, what can non-Muslims do to help?

They can help by trying to learn the essential fact that the bastardised versions have no resemblance to Islam as it was originally intended. They can help by becoming allies. So engaging with Muslims in ways that are more sympathetic and understanding. The siege that contemporary Muslims are facing is what non-Muslims need to realise.