Bebe Rexha feared she would be raped by a producer.

The 'Meant To Be' hitmaker has recalled her terrifying feelings when she was alone in a recording studio with a producer and five of his friends.

She said: ''There was one night. I was alone in the studio and a [different] producer had a group of five or six guys with him. I had heard things about him from his past and I just couldn't take it any more. I felt like I was going to get raped. I quietly called myself a taxi from the recording booth, which was enclosed, and I got the f**k out of there. It was the worst night ever.''

And the 30-year-old singer is forever grateful to Kesha's mother Pebe for stopping her from working with Dr. Luke and says ''trusting her was the best thing she ever did''.

She added: ''I was scared that could have been my situation. I remember being at a dinner party with [Kesha and her mother, Pebe Sebert]. Her mom came up to me and whispered, 'Don't do it.' She was talking about working with Dr Luke. The music industry can be a dark place, and she could have been trying to stop me from getting in her daughter's way. But I listened and honestly? Trusting her was the best thing I ever did.''

Bebe has recalled one experience she had with a ''really famous'' producer.

She told the October issue of Cosmopolitan magazine: ''There was a producer who would come into the studio and massage my feet. One time he tried to go above my knees and was getting a little rough, [so] I pulled my feet away. He said, 'Nah, I'm going to do what I want.' But I was raised to never let someone touch my body if I don't want them to. He's really famous. My former managers said, 'Just work with him, you need a hit song.'''

The new issue of Cosmopolitan is on sale from September 5.