Jessica Henwick's 'Star Wars' role was created because she missed out on Rey after a six-month audition.

The 27-year-old actress - who played Jess Pava in 2015's 'The Force Awakens' - has revealed how she initially went through a gruelling process before the lead role eventually went to Daisy Ridley, but director J.J. Abrams still wanted her involved.

She told the Hollywood Reporter: ''Oh my God, dude. That was f***ing six months. That was a long one.

''I was auditioning for a different character, actually, so I spent six months auditioning for that character.

''And then, at the end, J.J. said, 'I want you to be in the film, but I want to write a character for you.' That's how Jess Pava was created.''

Although she is glad to have played the X-wing pilot in the new science fiction trilogy - which concluded with 2019's 'Rise of Skywalker' - the star was ''a mess'' after finding out she'd missed out on the role of Rey.

She added: ''So, it was a very, very long experience. It's hard because I've been doing this long enough to know that you go in, audition, put it to the back of your mind, don't think about it and don't get emotionally invested.

''But, after six months, you can't help but just desperately want it. I'm also such a big J.J. fan. So, I was a mess at the end of those six months.''

Meanwhile, Henwick also opened up on why the character of Jess has resonated with fans so much.

She said: ''It was lovely. I think people really connected to the fact that she was the first female X-wing pilot that we've seen -- in the films, anyway.

''The amount of fan fiction and fan art was beautiful. That community is wonderful.''