Being the newcomer in a long-running show is hard. But being the newcomer on Doctor Who in Steven Moffat and Peter Capaldi’s final series when you’re new to television… that’s terrifying. Especially when, a few hours after your casting has been announced, a Doctor Who fan posts a selfie on Facebook dressed up as you… “I thought, ‘What on Earth have I got into?’” Pearl Mackie shakes her head.

She’s perched on a sofa in an office in Cardiff with Peter Capaldi looking languid just next to her. “I think the biggest difference is people recognise you much more,” he tells her. “It happens almost immediately. Millions will be watching and a lot of them will be where you live or on your bus – at least, it’ll feel like that.” And he flashes a mischievous grin.

Mackie looks nervous. “It’s already happening,” she says. “A French guy tried to take my picture the other day.” Capaldi reassures her that it won’t be that scary: “People like seeing the Doctor going for coffee,” he explains. “The show is quite a benign friend so that’s what you get – people shouting from their cars, ‘Here, Doctor Who, where’s your Tardis?’”

We’re talking in March, almost a month before the press reported that Mackie won’t make the next series when Broadchurch creator Chris Chibnall takes over from Moffat. The BBC brushed off speculation and said they “never reveal the fate of individual characters on the show”. They said: “Viewers will have to tune in to find out. We’re still filming series ten and no casting decisions have yet been made on series 11.”

Certainly, that kind of speculation won’t help Mackie get into the groove of the role – as if playing Bill, the show’s first gay companion, wasn’t pressure enough. Capaldi himself didn’t take too long to settle – he was cast in August 2013, wary of the increased scrutiny, but kicked off with a world tour to plug the show where he felt, he told RT, like a rock star. But Capaldi had always been a fan of Doctor Who.

For Mackie, 29, it’s different – the show was on its extended hiatus when she was a kid. “It came back in 2005 when I was about 16 and was going out at the weekends,” she says. “I’d seen bits – I’d seen the Daleks on the hundred scariest moments on TV and stuff like that. But I didn’t really know the show like a fan would.”

When Mackie got the casting call, she didn’t know it was for Doctor Who. She was in the West End version of The Curious Incident of the Dog in the Night-Time and her agent told her about a new show called Mean Town. “It transpired it was an anagram for Woman Ten, the companion in the tenth series, because if agents had known it was a Doctor Who casting, they’d have put every client up for it,” says Mackie.

The Doctor’s new companion is called Bill and she’s a cocky, uneducated but ferociously bright canteen assistant at St Luke’s University, Bristol, where the Doctor has been teaching for decades. The task of finding Bill fell to casting director Andy Pryor, and he saw 70 people, met 50, recalled ten, and asked five to meet Capaldi and Moffat to read a new scene.

That meeting took place at the swanky Soho Hotel in London. “Just walking through the foyer was nerve-racking,” Mackie shivers. “I rocked up in my Afro and bright yellow trainers and a baggy T-shirt, into this big glossy octagon foyer and they told me to wait in a room till they were ready for me,” she smiles. “I almost ran away.”

Capaldi is surprised. “Did you not feel at home?” he asks and Mackie shrugs as if to say no. “I think you looked very cool there,” adds Capaldi. “You looked great.” Mackie seems nonplussed. “Well... thank you. I must have been outwardly confident,” she smiles. “But then when you and I read together and you said, ‘Shall we stand up?’, I panicked. At TV auditions I just sit still and try not to move my face too much.”

Moffat is known for nicking little bits of actor’s personalities and putting them into the script. For instance, Capaldi’s sonic screwdriver replacement – the sonic sunglasses – were written in when Moffat noticed Capaldi wearing shades all the time. For Mackie, it’s already happened. Moffat heard her describe her audition and wrote lines into the first scene where Bill explains falling in love with a girl she was serving in the canteen and says she tries to keep her face still – “because it just tends to move quite uncontrollably”.

Capaldi’s having none of her nervousness. “You didn’t seem fazed,” he tells her. “You seemed to have a life beyond the scene. It was like Bill had existed rather than saying lines for an audition.”

Describing their on-screen relationship, Capaldi says, “There’s almost an Educating Rita element. The Doctor decides to take her on as a pupil and there’s a lot of jousting between them. They banter, for want of a better word.”

“She tends to say things kind of as they are and can be quite direct,” Mackie jumps in. “I think he’s surprised by her.”

“I mean they do have squabbles or quarrels, but nothing ever too serious because we’ve got monsters and stuff to beat up,” says Capaldi.

“Exactly,” says Mackie. “That’s the priority.”

This easy exchange between the two leads is almost the opposite of Capaldi’s initial uncertain relationship with Clara, as he struggled to inhabit his body as the recently regenerated Doctor. At the time, after the intense flirting between Clara and Matt Smith’s younger Doctor, he seemed cold and distant. Capaldi’s Doctor has changed across his tenure – warming and relaxing and showing a penchant for electric guitar power- chords. Was that a deliberate story arc or just him getting used to the role?

“Both, really,” he muses. “Very few Doctors are the same when they finish as when they started. If you look at Tom Baker, in the beginning he is avuncular, but by the end he’s extremely dark, he’s shouting at people and giving everybody a hard time. I think you do become more comfortable and put in some elements of yourself – in some stories more than others. But I quite like mixing it up.”

The power-chords, Capaldi explains, were his idea – “I just thought it would be funny if he played the guitar,” he shrugs. “The hardest thing is investing a 50-year-old show with a kind of mystery and an alien-ness. Everybody knows everything about him.”

Is that why he’s leaving? “I’ve never done anything for any length of time,” he counters. “Even The Thick of It was only 20 episodes over four years. I’ll have done 40 episodes of Doctor Who. I don’t think if I stayed on I’d be able to think of another way to say, ‘This could be the end of civilisation as we know it.’ I’ve always gone from one job to the other and seen what was around the corner and I want to get back to that.”

Joining him – and Mackie – on his final charge round the galaxy is Matt Lucas’s alien Nardole, and while there’s Ice Warriors and Cybermen and intelligent pools of water that eat people to contend with, the main arc to the series “is a lot to do with the relationship between the Doctor, Bill and Nardole really,” Mackie explains. “It’s about the way that they get to know each other. There’s a nice dynamic – they’re all very different.”

Indeed, Mackie is very happy talking about fighting monsters – “I love the smell of latex in the morning,” – and everything’s going well until RT asks the final question. As Bill is gay, do the two of you think it’s time to shake things up a little bit more and maybe, after Peter leaves, cast a woman as the Doctor?

They both freeze and their faces drop. They’ve clearly been asked this many times before. “I’m sure they will find the best person for the job,” says Capaldi. “I’m sure they will,” agrees Mackie. And just for a moment they seem like Doctor Who villains – stony-faced with blazing eyes – and there’s never a Tardis around when you need to flee these days... 

Doctor Who airs at 7:20pm on Saturday on BBC1