The very first scene of the Doctor Who season 10 finale is a spoiler, but it’s a spoiler that doesn’t quite make sense … yet. And if you thought time travel created some weird cause-and-effects loops on Doctor Who before, “World Enough and Time,” makes the rest of the entire series look tame.

Spoilers for part one of the two-part Doctor Who season 10 finale; “World Enough and Time.”

Hardcore fans have already known for months that the Doctor Who season finale would not only feature not only the return of the classic-era Mondas Cybermen but also the John Simm Master. Even so, “World Enough and Time,” introduced both of these plot elements shockingly. Which is saying something, since the episode itself began with the 12th Doctor collapsing in front of the TARDIS, clearly about to regenerate. Will this end up being the first scene of this year’s Christmas special? Where is the Doctor in this scene? Why is his hair so much bigger and curlier? Is it the planet Mondas? Or is this Antartica’s Snowcap Station from the classic episode “The Tenth Planet?”

Everything that happens after that first scene, seems to work backwards from it. The episode brings us back to relative “present,” and the Doctor has decided to test Missy on becoming good. Bill, Nardole, the Doctor and Missy answer a distress from a large colony ship that is hanging out next to a black hole. Because of the huge amounts of gravity, time runs slower on one end of the ship than the other. (Sort of like what happens when Romilly gets really old in like three seconds in Interstellar.)

Bill gets shot by a blue person and taken to the far end of the ship, while everyone else is trapped at the other end. Long story short: one end of the colony ship is populated by sick humans who are slowly being “cured” by being turned into cyborgs. And, these aren’t just any garden-variety cyborgs, these are the OG Mondas Cybermen. And, by the end of the episode, Bill is straight-up a Cyberman. Plus, a kindly weirdo who has been hanging with Bill the whole episode is actually just the Master in a lame disguise. The Master explains to Missy that’s he’s “worried about his future,” and then tells the Doctor that everyone is witnessing “the genesis of the Cybermen.”

There are a lot of references to the entirety of Doctor Who packed into this episode. The Master’s taunt references a 4th Doctor episode called “Genesis of the Daleks,” the Doctor tells Nardole he knows “Venusian aikido,” a kind of martial arts practiced by the 3rd Doctor, the Master makes a reference to being Prime Minister and having lame disguises, the Doctor explains to Bill the beginnings of his and the Master’s friendship, and Bill’s Cyberman cries just like Cyber-Yvonne Hartmann did in the 2nd season finale, “Doomsday.” All the while, composer Murray Gold makes uses of musical motifs and themes from the 10th Doctor era including the Master’s drums and the soaring music called “Gallifrey, Our Childhood, Our Home.” (Also, was Capaldi pulling a David Tennant-worried teeth-clench-face when the Master showed up, or is that reading too much into it?)

But the biggest reference is also the episode’s big rectcon: the origin of the original Cybermen is now different. In a 1st Doctor adventure in 1966, the Cybermen show up in a serial called “The Tenth Planet.” That tenth planet is Mondas, a kind of secret twin planet of Earth. Up until know, the first kind of Cybermen were thought to be from that planet. But now it looks like the Cybermen were from a colony ship from that was Mondas, and their origin was helped along by the Master, Missy, and unwittingly, by the Doctor and Nardole just being there. Which means, Doctor Who has traveled back to a point in time before the 1st Doctor faced the Cybermen

In real life, “The Tenth Planet,” is one of the infamous “lost” serials from classic Doctor Who. This means there are no complete recordings of the episode, making this retcon of the Cybermen a slightly meta touch: this period of Who history is murky in our world, too. Tellingly, William Hartnell’s very 1st regeneration scene in “The Tenth Planet” also took place in a snowy environment when the TARDIS traveled to Antartica to defeat the Cybermen. The offical animated restoration of this scene seems very reminiscent of the opening scenes of “World Enough and Time.”

What all this means for the second part of the season finale — “The Doctor Falls” — remains unclear. Will the Doctor’s coming regeneration be connected to the 1st Doctor? Will, Missy, the Master and the Doctor actually team-up against the Cybermen? And what of poor Bill? Will everyone’s favorite new companion actually ended up a permanent retro-1960s cyborg?

The 10th season Doctor Who finale — “The Doctor Falls” — airs on Saturday July 1st on BCC and BBC America at 9pm EST.