"Hell Bent" is the twelfth and final episode of the ninth series of the British science fiction television series Doctor Who. It was first broadcast on BBC One on 5 December 2015.This episode sees the return of Ohila and the Sisterhood of Karn after previously appearing in the ninth series premiere "The Magician's Apprentice". This episode also sees the return of Gallifrey and the Time Lords, after last appearing in "The Day of the Doctor", while also briefly featuring the Daleks, the Weeping Angels, and the Cybermen. The episode marks the final appearance of Jenna Coleman as Clara Oswald.In Nevada, the Doctor enters a diner and encounters a waitress physically identical to Clara. Neither one appears to recognise 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, setting off 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 for over 4 billion years by Rassilon, to force him to reveal the identity of the Hybrid of Gallifreyan prophecies, 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 asserts that 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, 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 suddenly 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 newly-regenerated 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. Clara turns the tables, distracting them long enough for the Doctor to steal a new TARDIS from the workshop below the Cloister, just as he did when he originally left Gallifrey.The Doctor attempts to take Clara far enough away from Gallifrey that she will break away from the time loop and regain her heartbeat. The Doctor hopes 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 a knock at 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, so that it will backfire on the Doctor. When the Doctor and Ashildr return, Clara admitss she watched them. She tells the Doctor that 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 with no idea how he had arrived or any idea who Clara is.In the present, managing 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 indeed Clara herself. The restaurant-TARDIS departs, leaving the Doctor behind and revealing his own TARDIS, still covered with Rigsy's painted tribute to Clara 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 puts on his own coat and 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 with a snap of his fingers, ready to continue his adventures. The Doctor then sets the TARDIS for a new destination with Rigsy's tribute flaking off as the TARDIS dematerializes. The Doctor's TARDIS and Clara's TARDIS pass by each other mid-flight, before flying off in opposite directions.The TARDIS that the Doctor and Clara steal to escape the Cloisters is modelled in its interior on the original TARDIS from the original series as seen in An Unearthly Child. This is the first episode since "The End of Time" to feature Rassilon. Clara uses the phrase "reversed the polarity" in modifying the memory wiping device; this is a phrase commonly associated with the Third Doctor, but has been used by other Doctors as well. The Doctor, once on Gallifrey, travels to the same barn on the Dry Lands where he spent time as a child, as seen in "Listen", and would later be where he debates the use of the Moment in "The Day of the Doctor".Before deciding that the Doctor and Clara, combined, are the Hybrid, Ashildr postulated that the Doctor might be half-human and thus the Hybrid. The Eighth Doctor made a similar statement about his lineage in the 1996 television movie. When Ashildr knocks on the TARDIS's door, she knocks four times, which the Doctor points out. This is a reference to the Tenth Doctor's regeneration and the prophecy stating "He will knock four times" just before his death. When the Doctor decides to wipe Clara's memory of himself to save her, he mentions that he's done it before, telepathically, referring to the Tenth Doctor's wiping Donna Noble's memory of him and her travels in the TARDIS in "Journey's End". The Doctor recognizes the diner as the same one he visited as the Eleventh Doctor in "The Impossible Astronaut" with companions Amy Pond and Rory Williams.The Cloister Wars were mentioned by Missy in "The Magician's Apprentice", along with the Doctor stealing "the moon and the President's wife." The Doctor sets the record straight in this episode (albeit inadvertently in his babbling when reunited with Clara after over four billion years), claiming that it was his daughter, not his wife, and that he did not steal the moon, he 'lost' it. The Doctor claims he rescued Clara because he has "a duty of care", a phrase first mentioned in "Under the Lake".Foxes' version of "Don't Stop Me Now" is heard playing when the Doctor first walks into the diner; the song was also used in "Mummy on the Orient Express". The Doctor, while talking to the waitress, plays on an electric guitar, and at times plays variations on both Clara's theme, as composed by Murray Gold and heard first in "Asylum of the Daleks", and the "Bad Wolf" leitmotif.The read through for the episode took place on 4 August 2015, and filming began on 10 August 2015. The external scenes were shot over three days in Fuerteventura during late August.Maisie Williams, who played Ashildr in "The Girl Who Died" / "The Woman Who Lived" and "Face the Raven", appeared in this episode, as did Ken Bones, who reprised his role from "The Day of the Doctor" and Claire Higgins, who played Ohila. Donald Sumpter previously appeared as Enrico Casali in The Wheel in Space and as Commander Ridgeway in The Sea Devils. He also appeared in The Eternity Trap, a story from spin-off series The Sarah Jane Adventures, playing Erasmus Darkening. Jami Reid-Quarrell returned as a Wraith, after previously playing Colony Sarff in "The Magician's Apprentice" / "The Witch's Familiar", as well as the Veil in "Heaven Sent".The episode was watched by 4.47 million viewers overnight in the UK, a 20.0% audience share. It received an Appreciation Index score of 82."Hell Bent" received mostly positive reviews from critics. The episode received a score of 83% on Rotten Tomatoes, with an average score of 8.0/10. The site's consensus reads ""Hell Bent" swerves from the expected storyline for the finale, and instead delivers a heartfelt resolution for The Doctor and his companion".In his review for Digital Spy, Morgan Jeffery said the episode was "at points thrilling and affecting" but "it's the shaky climax that people will remember, and unfortunately that could end up overshadowing the episode's (many and various) good points." Den of Geek's Simon Brew thought the episode was "a coherent, nerdy, often brilliant, sometimes a little frustrating, but always watchable piece of television". Amy Burns of the Independent found it to be "an emotional and humorous episode" although they admitted "not understanding about half of what happened."Not all reviews were positive, however. John Hussey of Cult Fix criticised Clara's return, saying that "Face the Raven was a poetic ending for Clara and it should’ve been left alone, not dragged out with timey-wimey nonsense." He further went on to criticise the lack of resolution to the Hybrid Arc of the series, saying "it added very little to the series and resulted in nothing spectacular, other than pure speculation; essentially back were [sic] we started."