Doctor Who season 12 saw the Master learn the secret of the Timeless Child from the Matrix - and it was set up in the classic series. Doctor Who season 12 shook the show's continuity to the core, with the Master revealing the Doctor was in fact the Timeless Child - a being who potentially predated the universe itself, and who became the base genetic code for the entire Time Lord race.

The Master had learned these secrets from the Matrix, the repository of Time Lord knowledge; the memories of every Time Lord are uploaded into the Matrix in the moments before their death. When he learned the truth about the Timeless Child, the Master destroyed his entire homeworld of Gallifrey in a fit of rage. Surprisingly, though, the Master's exploration of the Matrix - and his discovery of the Timeless Child - was foreshadowed in the classic Doctor Who series.

Related: Classic Doctor Who May Have Revealed The Timeless Child's Fate

Doctor Who season 23 was a single, season-length event called "The Trial of a Time Lord." The Doctor was put on trial by his own race, with the Time Lords attempting to engineer his execution; it was all part of a vast cover-up, because the Time Lords had learned Andromedan agents had managed to steal some of the Matrix's deepest secrets. They'd taken extreme measures to conceal the theft, and the Doctor had stumbled a little too close to the truth. And so, he had to be silenced. Over the course of the trial, the magnitude of the security breach became evident when the Master revealed he too had been involved in breaking into the Matrix - and could come and go without any trouble.

Doctor Who Trial of a Time Lord

According to "The Trial of a Time Lord," Gallifrey's Matrix records are stored in 'Phases.' The Master - and the Andromedans - were interested in phases three through six; previous phases had been relegated to the archives. It's safe to assume this explains why the Master returned to the Matrix in Doctor Who season 12; he figured he wanted to obtain the rest of the Matrix's secrets, to be able to say he had obtained all the deepest secrets of the Matrix and the Time Lords.

This gives a sense of just how effective the Time Lords were in concealing the Timeless Child. They had adjusted the Matrix records, in itself believed to be an impossibility, and then had further moved those ancient records - which detailed the secret origin of their entire race - into the archives. There, they would no doubt have remained buried for all time - except for a twisted Renegade who just couldn't resist prying.

More: Doctor Who Theory: The Time Lords Can Return As The Ultimate Villains