Doctor: Peter Capaldi (Twelfth Doctor)
Companion: Jenna Coleman (Clara Oswald)
Donald Sumpter – The President
Ken Bones – The General
Maisie Williams – Ashildr
T'nia Miller – Female General
Malachi Kirby – Gastron
Clare Higgins – Ohila
Linda Broughton – The Woman
Martin T. Sherman – Man
Jami Reid-Quarrell, Nick Ash, Ross Mullen – Wraiths
Nicholas Briggs – Voice of the Dalek
Directed by Rachel Talalay
Written by Steven Moffat
Script editor Nick Lambon
Produced by Peter Bennett
Executive producer(s) Steven Moffat
Incidental music composer Murray Gold
Series Series 9
Length 60 minutes
Originally broadcast 5 December 2015
In Nevada, the Doctor enters a diner and encounters a waitress physically identical to Clara Oswald, with both not recognizing the other. He begins to tell her a "story" about Clara. As the Doctor narrates, the episode flashes back to Gallifrey, where the Doctor has escaped from his confession dial, activating the cloister bells in the city that alert the Time Lord President, the High Council, and the Sisterhood of Karn. They try to summon the Doctor to them, but he refuses their overtures. The President then attempts to have the Doctor executed, but others, including the Gallifreyan military, see him as a war hero. Instead, they help to exile the President, who is revealed to be Rassilon, and the High Council. The Doctor learns that he had been trapped in the confession dial by Rassilon, to force him to reveal the identity of the Hybrid of Gallifreyan prophecies, which is destined to conquer Gallifrey and stand in its ruins. The General and Ohila attempt to learn more about the Hybrid from the Doctor, but the Doctor claims he must consult Clara Oswald about it.
The Doctor has the Time Lords use an "extraction chamber" to retrieve Clara from her timeline the instant before her death in "Face the Raven", with her biological processes suspended in a time loop. This keeps her alive, but leaves her without a pulse and unable to age. The General attempts to explain the situation to Clara, but the Doctor steals his sidearm and, after confirming that he can still regenerate, shoots him to cover his and Clara's escape. The Doctor takes a neuro block from the lab before the pair flee to the Cloisters, which contains the Matrix, the computer system that serves as a repository of the knowledge of dead Time Lords. While looking for the exit and avoiding the Cloister Wraiths that protect it, the Doctor tells Clara about one Time Lord who managed to escape the Cloisters, leaving him mad. Clara recognises this was the Doctor himself, having learned of the prophecy of the Hybrid from the Wraiths. This would lead him to leave Gallifrey in a stolen Type 40 TARDIS. The Doctor tells Clara he held out confessing in order to have something to bargain for her life with when he eventually escaped through the Azbantium wall. The newly-regenerated now female General and Ohila give chase and attempt to convince Clara to come with them and for the Doctor to tell them what he knows. Questioning Ohila, Clara learns the Doctor was held in the confession dial for four and a half billion years, though he could have left as soon as he gave up what he knew about the Hybrid. Clara distracts the Time Lords, allowing the Doctor to steal a new TARDIS from the workshop below the Cloister.
The Doctor attempts to take Clara far enough away from Gallifrey that she will break away from the time loop and regain her heartbeat, hoping that he can escape having to return her to the moment of her death, despite potentially damaging time itself in the process. When it becomes apparent that Clara's timeline is not readjusting, the Doctor pilots the stolen TARDIS to the extreme end of the Universe, minutes before it is due to totally collapse. Having travelled only in time, not space, the TARDIS materialises inside the ruins of Gallifrey. The Doctor answers the door and finds Ashildr waiting for him, having lived through the entire existence of the universe and becoming the last immortal being left. He accuses her of being the Hybrid, being a human modified with Mire technology. After the Doctor dismisses her idea that the Hybrid may instead be half-Time Lord and half-human, Ashildr presents her own theory on the Hybrid's identity: that the Doctor and Clara together are the Hybrid. Since they are so alike, each pushes the other to potentially catastrophic actions. The Doctor then reveals his intention to erase Clara's memories of him, hoping that if she is left on Earth without memory of the Doctor, the Time Lords will not be able to find her.
Clara, who has been listening to them from inside the TARDIS, attempts to reverse the polarity of the neuro blocker using the Doctor's sonic sunglasses, to backfire it on the Doctor. When the Doctor and Ashildr return, Clara admits she watched them. She tells the Doctor she is happy to accept her death, but insists on retaining her memory. The Doctor doubts that Clara has successfully reversed the function of the neuro blocker, but concedes that he has gone too far to save Clara. The two agree to activate the neuro blocker together, not knowing which one of them will be affected. Upon activation, the device erases the Doctor's memories of Clara, who says his goodbyes to her before passing out. The Doctor awakens in the Nevada desert unaware how he had arrived or who Clara is.
In the present, having managed to piece together everything about Clara except what she looks like, the Doctor finishes telling his story to the waitress, who encourages him to keep going. She then goes to a back room, revealing Ashildr and the TARDIS console. The diner is in fact the new TARDIS the Doctor stole, and the waitress is Clara. The restaurant-TARDIS departs, leaving the Doctor behind and revealing his own TARDIS, still covered with Rigsy's painted tribute to Clara ("Face the Raven") which includes her portrait. Ashildr reports that the chameleon circuit isn't working, so their TARDIS is stuck in the form of an American diner. Clara declares her intent to return to Gallifrey to die and restore the timeline, as her death is a fixed point in time. But since she is now ageless, she decides to "take the long way around" and sets off with Ashildr to travel the universe.
Inside his own TARDIS, the Doctor finds a message from Clara on his blackboard: "Run, you clever boy, and be a doctor". The TARDIS produces a new sonic screwdriver, and the Doctor closes the doors, ready to continue his adventures. The Doctor then sets the TARDIS for a new destination with Rigsy's tribute fading as the TARDIS dematerialises. The Doctor's TARDIS and Clara's TARDIS pass by each other mid-flight, before flying off in opposite directions.