Doctor Who's season 12 finale was inspired by an unused concept from the show's 20th anniversary. Current Doctor Who showrunner Chris Chibnall grew up watching the classic series, and as a result he draws a lot on elements from the show's first few decades. Oddly enough, it means some of his plot twists - notably the Timeless Child reveal - sit more comfortably with old Doctor Who than they do with the Russell T. Davies and Steven Moffat years.

The Doctor Who season 12 finale was a key step in Chibnall's vision for the series. It saw the Doctor return to her doomed homeworld of Gallifrey, which had been destroyed by the Master in a fit of pique, where she learned her old nemesis had used the bodies of the Time Lords to create a new generation of Cybermen. Dubbed "CyberMasters" in the scripts, these creatures possessed the ability to regenerate - and, drawing on the Doctor's own genetic structure as the Timeless Child, the Master had figured out how to remove the Time Lord regeneration limit.

Related: Every TARDIS In Doctor Who Canon (Besides The Doctor's)

Surprisingly, though, this concept appears to actually be inspired by an unused plot for Doctor Who's 20th-anniversary special, which ultimately morphed into The Five Doctors. As noted in Doctor Who Magazine #467 (via Doctor Who InfoStamp), in 1982 producer John Nathan-Turner and script editor Eric Saward approached writer Robert Holmes to draw up a script for the special. One of his ideas was a story called The Six Doctors, in which the Cybermen kidnapped various incarnations of the Doctor in order to identify the genetic key to Time Lord powers of regeneration and create the Cyberlords (William Hartnell's First Doctor would be revealed to be an android near-duplicate, explaining the title).

A Cybermaster in doctor who

While it's true this may be just a coincidence, it's unlikely; Chris Chibnall is a hardcore fan of classic Doctor Who, with even his Timeless Child reveal building on concepts from the Tom Baker and Sylvester McCoy eras. This is just the kind of thing Chibnall would notice and reuse, and - when combined with the concept of unlimited regenerations - it really does create a rather terrifying new menace for the entire universe. What's more, this also rewrites the "Hybrid prophecy" from the Peter Capaldi years, which foretold the emergence of a being born of two warrior races who would doom Gallifrey. The CyberMasters become the fulfillment of this prophecy.

So it really does look as though an unused concept for The Five Doctors ultimately inspired Doctor Who season 12's finale. Amusingly enough, there is another aspect of this anniversary special that now looks like foreshadowing too; the scripts never identified Doctors by number, instead referring to the Hartnell Doctor, the Pertwee Doctor, and so on. It wasn't until the Moffat years that Doctor Who really began to definitively consider Hartnell to be the First Doctor - so there's a sense in which Chibnall's Timeless Child retcon simply restores an older status quo.

More: Doctor Who Hints The Doctor Knows Spider-Man