"The Time of the Doctor" is an episode of the British science fiction television programme Doctor Who, written by Steven Moffat and directed by Jamie Payne, and was broadcast as the ninth Doctor Who Christmas special on 25 December 2013 on BBC One. It features the final regular appearance of Matt Smith as the Eleventh Doctor and the first full appearance of Peter Capaldi as the Twelfth Doctor following his brief cameo in the previous episode "The Day of the Doctor". The episode also features Jenna Coleman as the Doctor's companion Clara Oswald, plus several enemies of the Doctor, including the Daleks, Cybermen, Silence and Weeping Angels.

The episode addresses numerous plot threads developed over the course of Smith's tenure, including the prophecy of the Silence, cracks in the universe, and the Doctor's fate on the planet Trenzalore, while also dealing with the regeneration limit established in the 1976 serial The Deadly Assassin. "The Time of the Doctor" is Smith's fourth and final Christmas special as the Eleventh Doctor.

The Time of the Doctor

Plot

Thousands of aliens orbit the planet Trenzalore, from which a message is continually being broadcast across time and space. The Church of the Papal Mainframe constructs a force field around Trenzalore. The Eleventh Doctor and Clara are offered the opportunity to explore to find the source of the message on the planet by the church's head, Tasha Lem.

The Time of the Doctor

They discover the message is coming from a human settlement called Christmas. The message originates from a crack in reality in the clock tower and is being sent by the Doctor's people: the Time Lords. The Doctor deduces the Time Lords are trying to escape the pocket universe they are in and want the Doctor to announce his name as a sign that it is safe to emerge. A stalemate is in place; the other aliens cannot attack at the risk of the Doctor letting the Time Lords out, while the Doctor cannot risk abandoning Trenzalore as most of the forces in orbit will burn it to stop the Time Lords' return.

The Time of the Doctor

The Doctor tricks Clara into being returned to Earth. Clara jumps onto the TARDIS before it returns to the Doctor, arriving 300 years later. The Doctor reveals to her that his body has no further regenerations left, and that he is prepared to die defending Trenzalore. The two discover that in the intervening time, the Papal Mainframe have renamed themselves the Church of the Silence, and that a chapter of the Silence broke off to try to interfere with the Doctor's life, which includes them unwittingly creating the crack in the tower. After rescuing Tasha Lem from the Daleks, the Doctor tricks Clara again into being returned to Earth. As even more centuries pass, the Daleks remain the only aggressors against the Doctor and the dwindling forces of the Silence. Tasha eventually brings Clara back to Trenzalore as the siege finally comes to a conclusion. The Doctor is dying of old age and cannot stop the Daleks' attack. After saying goodbye to Clara, he goes out to the top of the tower to face his enemies.

Clara speaks to the Time Lords through the crack, begging them to help the Doctor. The crack in the tower closes and reappears in the night sky. Regeneration energy flows from the crack and into the Doctor, granting him a new regeneration cycle. The Doctor uses the excess energy of his regeneration to destroy the Daleks, while the crack closes, ending the stalemate. In the aftermath, the Doctor sets the TARDIS in motion, and finishes regenerating. The Twelfth Doctor finds the TARDIS is crashing while Clara looks on in confusion.

Production

Actor Matt Smith said filming would commence on the episode when he had finished work on the film Lost River. He later revealed filming would start in September. The episode was directed by Jamie Payne, who previously directed the episode "Hide". The read-through for the Christmas special took place on 4 September 2013.

In August 2013, lead writer Steven Moffat stated in an interview that the Christmas episode would tie together the remaining story strands from the Eleventh Doctor era, some of which were introduced as far back as "The Eleventh Hour". Production on the episode was scheduled to start on 8 September. Owing to his work on Lost River, which required him to have a buzz cut, Matt Smith had to wear a wig to mimic the Doctor's signature hairstyle. In August 2013, it was revealed that the Cybermen would feature in the Christmas episode, when one of the show's regular stunt artists, Darrelle "Daz" Parker, tweeted that she would be playing a Cyberman.