Rebel Wilson revealed she was sexually harassed by both a powerful male star and a top director early in her career.

The 37-year-old Pitch Perfect actress has accused an unnamed "male star" who she said was in a "position of power" of asking her to go in a room with him.

The Australian actress also claimed she had a separate "hotel room encounter" with a "top director", but said nothing physical happened after his wife called and shouted at him for sleeping with actresses.

"Luckily she was yelling so loud that I could hear her and I bolted out of there immediately," she wrote in a series of posts on Twitter.

"I was so naive the thought of anything happening apart from 'work talk' didn't even cross my mind," she added.

Wilson said she had been working overseas recently but had found it "so hard to hear all these stories relating to sexual harassment and assault in Hollywood".

She added: "As you guys know, I'm a pretty strong and confident person but even I have a story to tell. A male star, in a position of power asked me to go into a room with him .....

"All whilst his male 'friends' tried to film the incident on their iPhones and laughed. I repeatedly said no and eventually got out of the room."

She said her agent secured a deal with the studio to protect herself if something similar ever occurred and had been threatened by the star's representative to "be nice and support the male star".

"I feel lucky that I grew up in a pro-female environment, going to an all-girls high school, and that I have such a strong sense of self and have taken self-defence classes. I had the ability to escape both incidents. I realise not everyone is as lucky," Wilson added.

"To hear how prevalent sexual harassment and assault is, is just so saddening. I know my stories aren't as horrific as other women and men have described - but if you've ever experienced anything like this I feel for you and can relate on some level."

It comes after a New York Times report in October alleged film producer Harvey Weinstein had sexually harassed or assaulted several women. 

House Of Cards star Kevin Spacey also faces police investigations in the UK amid harassment and assault accusations.