A new documentary called A Sinner in Mecca tells the story of gay Muslim filmmaker Parvez Sharma as he does what more than 15 million other Muslims do annually — travel to Mecca, Islam’s holiest city.

But as a gay man, Sharma’s journey is fraught with peril — homosexuality can be punishable by death in Saudi Arabia.

Sharma sees his film as a message of defiance for the thousands of gay Muslims who are afraid to make the trip. “I felt I was doing it for them,” the Indian-born director told CBS News.

Related: A Loving Jihad For The Gays

The film was denounced by the Iranian state media as a “Western conspiracy” to legitimize the “despicable sin of homosexuality,” and security for the three sold-out screenings a the Hot Docs festival in Toronto was amped up in light of the death threats and hate mail Sharma has received.

“The Hajj is the highest calling for any Muslim,” Sharma explained. “For years I felt I really needed to go, so this film is about me coming out as a Muslim. I’m done coming out as a gay man.”

He shot the film on iPhones and other small cameras, as filming is not permitted. Along the way his equipment was seized, footage deleted, and he constantly feared for his freedom and life.

But it was never about salting wounds, says the director, but rather healing them.

“I feel the film is a call to action to all Muslims to change the things that need to change within 21st Century Islam,” he said. “We’re running out of time.”

Watch the powerful trailer below: