Steven Moffat has made an explosive return to Doctor Who, writing the third episode of the series which will see the Doctor “on a knife’s edge”.

The former showrunner had been at the helm of the sci-fi series for seven years, before announcing in 2016 that he would be leaving alongside star Peter Capaldi.

He returned to the BBC show to write the upcoming third episode of the new series titled Boom, with Ncuti Gatwa in the starring role and Millie Gibson as his companion Ruby Sunday, alongside showrunner Russell T Davies.

“I’ve done everything I could possibly think of on Doctor Who,” Moffat said.

“But it occurred to me that Doctor Who doesn’t often do suspense or tension – it does adventure, love stories and comedy all the time.

“It does just about everything, but not a lot of suspense. The Doctor kills suspense because he’s funny and in control, which quickly ends any suspense.”

The 62-year-old said the idea for the episode where the Doctor cannot move because of a landmine, was inspired by an episode of the show which aired in 1975 that he loved growing up.

He said: “I had this idea of the landmine – which of course is a short sequence in Genesis Of The Daleks that I happened to love when I was a kid.

Doctor Who
Peter Capaldi and Steven Moffat (Ian West/PA)

“I thought ‘what if you did it for a whole episode?’

“The Doctor on a knife’s edge, one wrong move and it’s all over. It would take so much away from him – he can’t run about, he can’t bamboozle people and he literally can’t move.

“I thought ‘that’s something that I haven’t done’.”

Moffat said he was “curious and surprised” to see Davies return to the show, because he “is not the sort of guy who does anything twice, he’s a guy who moves on”.

“We were punting ideas to each other, until I had one about ‘what if he steps on a landmine and cannot move for the entire episode, and everything he normally does is stripped from him’,” Moffat said.

“The moment I sent that one, Russell was incredibly keen, he replied within one minute saying ‘that’s it, that’s the one, do that’.”

Moffat said the show has been a “big part of my life” and he will often “day dream” about new storylines for the Doctor.

He said the new episode will see “tension, emotion and the Doctor afraid”.

“Putting the Doctor in absolute jeopardy and making him afraid, you get to see that side of him,” he said.

“The Doctor is not in control of the situation and he cannot do anything – he can’t help people, he can’t shove his way to the front and flourish his screwdriver and make something go away. He can do nothing as he can’t move.”

Boom, which will air on Saturday on BBC One and BBC iPlayer, follows the first two episodes of the new season titled Space Babies and The Devil’s Chord.