Amr Salama used the King of Pop's death as the driving force behind 'Sheikh Jackson,' a poignant meditation on identity and contradiction in the Islamic world.

A bearded hardline Islamic cleric with a secret passion for Michael Jackson — the idea seems like a goofy Ben Stiller comedy waiting to happen (and immediately offend). But it’s not actually as far-fetched as it sounds. In fact, when the concept for Sheikh Jackson — in which a strict Islamist and former King of Pop fan in Egypt suffers from a crisis of faith and identity after Jackson’s death in 2009 — was first suggested to director Amr Salama, it struck an intensely personal chord.

Much like the film’s central character, Salama was a “die-hard” King of Pop fan at school. “My nickname was Jackson. I had my hair long. Nobody else was like me in Egypt,” he says. But then at university, following a path taken by many young Egyptians in the late ’90s and early 2000s, he entered a “super religious” phase, which lasted a couple of years. “There was a rise in Islam — an era where you saw girls wearing headscarves and putting on the veil, and guys praying five times a day.” Salama says that writing the script was “agony,” going through about 11 drafts and five script consultants. “I was too attached to the character, but I didn’t surrender and kept working.”

Salama describes the end result as a “love letter to life and accepting all of your contradictions,” adding that it’s a story he hopes will connect in Egypt, where such an identity crisis is “very common” among his postrevolution, internet-exposed generation.

But one thing Sheikh Jackson isn’t is a comedy, and ensuring people appreciate this before they watch the film is something the director says has been his “biggest challenge.”

Also high on the list of difficulties — perhaps even the top one — was the music, especially trying to obtain rights from Jackson’s estate.

“That was a total pain in the ass,” admits Salama. Despite repeated attempts, he wasn’t able to use of any of the late singer’s songs. For many, that might put the brakes on a project in which the music plays a crucial role, but Salama — who hired Carlo Riley, one of the world’s top Jackson impersonators, to appear in several scenes — wasn’t deterred.

“When we couldn’t get the rights, we decided to invent new music for the film,” he says. “So I went to the music guys and tried to invent new sounds that sounded like Jackson.” And he’s rather pleased with the results.

“I’m confident that if Jackson was suddenly brought back to life and heard the music in this film, he’d use it in his next album.”

Sheikh Jackson has its world premiere at TIFF on Sept. 15.

This story first appeared in The Hollywood Reporter's Sept. 8 daily issue at the Toronto Film Festival.