Former porn star Mia Khalifa recalled the shocking threats she received after filming a scene where she had sex wearing a hijab.

Khalifa, 25, had only been in the porn industry a few months when a director told her she would be required to wear the traditional headpiece in a scene, she said.

She knew it wouldn’t sit well with the public.

“I said to him, ‘You’re going to get me f–king killed,’” she told BBC Radio’s 5 Live.

When asked why she didn’t say no, Khalifa said: “Being 21, I didn’t know that I could speak up.”

The scene made Khalifa the No. 1-ranked performer on Pornhub, but also drew the attention of ISIS.

Her face was Photoshopped onto another person’s body in a video that showed the mocked-up Khalifa being beheaded.

The footage scared her and confirmed what she feared when her director asked her to do the scene.

“There was also a Google image screenshot of my apartment tweeted at me, that had a death threat go along with it,” she said.

“It was a threat I took very seriously.”

Within a week of the video going up on Pornhub, Khalifa was hit with a load of abuse on social media from both the Muslim and Lebanese communities. ISIS also targeted her on Instagram.

“My Instagram account got hacked by ISIS. They started pushing propaganda on it.”

Despite coming under scrutiny for a number of other scandals in the last two years, Khalifa believes the incident with ISIS has made her a stronger person.

“No one harassing me on the internet is going to get to me after all that.”

Khalifa, who until recently was a co-host on the sports talks show “Out Of Bounds,” is still getting clicks on the porn site and refuses to be silenced by ISIS.

She recently appeared on an episode of Lance Armstrong’s podcast “The Forward” where she discussed not being able to shake the “porn star” distinction even though she only did it for a brief amount of time.

In the episode, themed “How we f**k up in life,” the former world No. 1 cyclist empathized with Khalifa, saying, “I’ve watched how you’ve tried hard to reinvent yourself … three months is just, no time, it’s crazy.”

She told Armstrong that a porn career was never something she had thought about, but when a man approached her shortly after she had breast surgery, she eventually caved.

“I thought about it for two weeks and made the mistake of saying yes,” she said.

Khalifa said she had low self-esteem after spending her teens overweight and was looking for validation.

“As soon as I started to gain popularity, that’s when I was like ‘Get the f–k out of this’ … this was not what I was trying to do whatsoever,” she told Armstrong about the overnight stardom that came with doing the controversial hijab scenes.

Now, with a passion for all things sport, the social media personality is trying to put her shady past behind her, looking at different ways to escape the “porn star” title.

“I just try to laugh things off because it could always be much worse.”