[Warning: The following contains spoilers for Season 12, Episode 5 of Doctor Who, "Fugitive of the Judoon." Read at your own risk!]

If you thought the Master reveal would be the biggest shock of the season, buckle up: Doctor Who just delivered two absolutely electrifying surprises back to back in Sunday night's episode, which was easily the best of the season so far. Who knew an episode with "Judoon" in the title could be so important?

"Fugitive of the Judoon" may technically be a space rhino episode, but it is all about the titular fugitive. Ruth Clayton (Jo Martin) seems like a very cool human woman — she's a cheery tour guide in Gloucester who gets hyped about a perfect piece of toast — but when the Judoon target Ruth and her cagey husband, Lee (Neil Stuke), the truth comes out: Ruth is the Doctor.

Discover your new favorite show: Watch This Now!

It's a fantastic, disorienting reveal: Just as Ruth, who used the chameleon arch to become human, cracks the glass that restores her to her true Time Lord self, our Doctor (Jodie Whittaker) is out in the yard brushing dirt off Ruth's buried TARDIS, like Scrooge seeing his own name on a headstone. Ruth appears behind her, changed (into a fabulous suit), and introduces herself: "Hello, I'm the Doctor." In the immortal words of Carly Rae Jepsen, before Jo Martin's Doctor came into my life I missed her so bad. She makes history as the first black Doctor in the Doctor Who franchise, and she's a super-cool lady who suffers no fools. What a gift to see two women face off in the TARDIS, each one shading the other's outfit.

Every incarnation of the Doctor is prickly with their past or future selves, but Ruth and Thirteen have even more reason to bicker: Neither one can remember ever being the other, even though one of them should. Where does Ruth fit in the Doctor's timeline? It seems like she's from our Doctor's past: Not only has she got a retro TARDIS interior (complete with the round things) and no clue what a sonic screwdriver is, but her Gallifrey hasn't been destroyed. She disguised herself as a human because she was on the run from a Gallifreyan named Gat (Ritu Arya), who wanted to take her back home.

So why can't our Doctor remember her? Is Ruth from an alternate timeline? Is the past being rewritten? There's a hint of John Hurt's War Doctor in Doctor Ruth: She's a little more pragmatic and less eccentric than your average regeneration, and she's not above using weapons, in a roundabout way. Did she — or will she — do something so extreme that the Doctor will choose to forget ever being her?

<p>Mandip Gill, Jodie Whittaker, Tosin Cole, Jo Martin, Neil Stuke, <em>Doctor Who</em> </p>

Mandip Gill, Jodie Whittaker, Tosin Cole, Jo Martin, Neil Stuke, Doctor Who

In any case, as the Doctor puts it, "time is swirling around her," which brings us to surprise No. 2: Captain. Jack. Harkness (John Barrowman). You can get excited now. A decade after his last appearance on Doctor Who and over eight years after the latest episode of Torchwood, Jack is back. He stole a ship (which is not up to his standards — it doesn't even have a bar) so he could track down the Doctor to deliver a message. He doesn't get to deliver that message directly to her, which had better mean we're in for a reunion later this season, but Jack and the Doctor's fam are a treat together. He scoops up Graham (Bradley Walsh) first, assuming he's the Doctor, and plants a kiss on Graham's lips. "Loving the grey at the temple," Jack flirts. "Kinda distinguished, but still sexy." It's a love fest all around: Ryan (Tosin Cole) and Yaz (Mandip Gill) agree that Jack is kind of cheesy, "but good cheesy."

When Jack is attacked by the nanogene security system (a callback to his first appearance in Season 1's "The Empty Child"/"The Doctor Dances") he's forced to abandon ship, but he leaves the Doctor's fam with a warning: "Beware the lone Cyberman... Don't give it what it wants, at all costs." So that's another overarching mystery we can throw on the pile for this season, on top of the Master's (Sacha Dhawan) whereabouts, the Timeless Child secret, and, now, how this new Doctor fits into our Doctor's history.

The Doctor is rattled by that last one, insisting more than once, "I know what I've done. I know my own life." (Then again, Ruth said the same thing.) She tries to shut down her friends' questions, snapping at Ryan that he doesn't really know her, but no one is having it. "You're the woman that brought us together," Ryan says. "The woman that saved us and loads of other people. You're the Doctor. Whoever you were in the past or are in the future, we know who you are right now." The Doctor looks touched when he, Yaz, and Graham all promise not to go anywhere; this is the acceptance she needed but has been afraid to ask for. We'll see if the Doctor's friends know what they're getting themselves into, but for now, what an hour. All my respect to co-writers Chris Chibnall and Vinay Patel for smuggling so much excitement into a Judoon episode.

Lines of the night:

Doctor: "You are only serving at the glory of ash and bone."

Graham: "Look at the state of that! That's the worst cake I've ever seen!"

All Ears Allan (Michael Begley): "I've got no money! I'm sorry, I'm terrible at this job."

Jack: "Seriously, three of you? I had a dream about this once."

Ruth: "And how did I end up like that, all rainbows and trousers that don't reach?"

Doctor: "I've never been anything like you. Trust me, I'd remember, especially that shirt."

Ruth: "Is there even a word for how dumb you are?"
Doctor: "Doctor?"

Doctor Who airs Sundays at 8/7c on BBC America.