Mahershala Ali revealed he accepted a role in David Fincher's 2008 film "The Curious Case of Benjamin Button," but only on the condition that he wouldn't have to film a love scene.

The 46-year-old actor, who converted to Islam while studying for a master's degree at NYU, explained on Common's "Mind Power Mixtape" podcast that filming a love scene with his co-star, Taraji P. Henson, would go against his religion.

"I get a call from my old agent, and she goes, ‘Mahershala, you got it, you got it, you booked the part,’" he recalled. "And I could believe it. I was so excited. But then I said, ‘There’s just one thing ... there is that one sex scene, there's that scene where they kiss. I was like, 'If there’s a sex scene, I can’t do it.’"

Fincher, the director, agreed to toning down the scene.

"Taraji and I begin to kiss, and then we fall out of the frame. ... It wasn’t clear if [Fincher] was trying to have like some bumping and grinding ... which I doubt he was," Ali said, adding that for him "at that time, 15 years ago, I was still like, ‘OK, I can only go up to this point,’ just because of — just trying to hold a space of respect for my religion."

Ali became the first Muslim actor to win an Oscar in 2017 for his role in "Moonlight." He spoke about his faith while accepting his first Screen Actors Guild award that same year.

"My mother is an ordained minister. I'm a Muslim. She didn't do backflips when I told her I converted 17 years ago," he said. But, he added, "I'm able to see her. She's able to see me. We love each other ... and that stuff is minutiae."

Ali stars in the upcoming Apple TV+ film "Swan Song," opposite Glenn Close, Awkwafina and Naomie Harris.