Game Of Thrones actress Maisie Williams has said it was "a joy" to work with Doctor Who star Peter Capaldi.

Best known for her role as Arya Stark in HBO's fantasy epic, the 18-year-old swapped Westeros for Gallifrey to guest star in BBC One's long-running sci-fi series.

"Peter has been such a joy to work with," she said. "My brother was so excited when he heard I got the part, as was I. He's a wonderful, wonderful actor and I couldn't wait to meet him. He totally lived up to my expectations and I love that!

"People say 'don't meet your idols as they never turn out to be who you want them to be'. That was completely not the case with Peter and he's been wonderful and really helpful on set."

Williams features in two Doctor Who episodes: The Girl Who Died, airing October 17, and The Woman Who Lived, airing the following week.

In the tense hour of The Girl Who Died, The Doctor and Clara (Jenna Coleman) must train a useless band of Vikings to defend themselves against the galaxy's most deadly army.

Executive Producer Steven Moffat described this instalment, penned by Being Human's Jamie Mathieson, as "the day when the Doctor remembers where he's seen his own face before".

The Bristol-born actress was approached to play a character called Ashildr, a name derived from Old Norse which means "battle god".

" I didn't know much about it, but I knew they were introducing a new character to work closely with the Doctor," she revealed.

"I'd got through the second episode and absolutely loved it! I was going to do a tape but ran out of time because I was in America shooting another film, so my agent worked really hard and sent over lots of clips and videos - they liked them and gave me the role."

The casting of Williams sparked a great deal of anticipation among fans, and the acclaimed actress also counts herself as one.

"When Doctor Who came back on television, a lot of my male friends were really excited. I didn't know much about it, but I watched a couple of seasons with David Tennant as the Doctor," she stated.

"Since I've been here, I've been questioning Jenna: why are you in a space suit? What's going on here? Have we met this person before? Does this link back to a previous episode? Anything I can find out. It has been really exciting working on it and I'm so glad to be a part of it now."

The Game Of Thrones star, who has played Arya Stark since 2011, felt at home on the Doctor Who set. " It's very nice to have that familiar bearded, hairy men setting. It's so refreshing to have this futuristic element linked in to it too, that's what has kept me going really, not just beards and dragons."

She added: "There's a whole new element that's fed in to the sides. It just looks so great with all of us in our Viking outfits, Jenna in her space suit and the Doctor in his cool coat with his crazy sunglasses. It makes for a really cool and interesting dynamic on screen."

Williams revealed how Doctor Who became a topic of conversation in her family. She said: "When I got the role, my mum would tell me about when she watched it before it came back more recently."

The young star also observed how the current Doctor Who series is maintaining the legacy of the classic series, which first aired back in 1963.

"I'm not so aware of the previous Doctors, but I know a lot of the lines Peter says now relate back to other Doctors' lines. It is so nice how they've incorporated the previous seasons in to the more recent episodes. I like how it all links in some way or another," she said.

Doctor Who airs on October 17 at 8.20pm on BBC One

Williams also told the Radio Times she never realised how "badly written" female characters in the acting industry were.

She said: "I didn't realise when I was younger that women were written so badly, but going further into this career I realised there are a lot of really bad characters, that it's not common to come across females who aren't just 'the girlfriend'.

"You can't pick and choose everything, but I hope to never have to play a character that is only there to benefit a male lead."

Earlier this year she also took part in the Channel 4 documentary Cyberbully, and says being famous can be "scary, but it's what you have to do".

She added: "I've stopped reading what people think now. It's easy for people to have an opinion online when they don't realise that there's actually Maisie Williams who's reading that and crying."

Williams isn't certain what her future holds, but says she may return to her dancing roots.

"I've never really had a plan, and it's worked out all right so far. At the moment I'm enjoying this industry and I don't want to stop any time soon," she said.

"But I know I want to dance at some point, because that's what I've always wanted to do. Who knows what I'll be doing in 20 years... or five years?