On Gallifrey in the last days of the Time War, the High Council gathers and the Lord President demands to know where the Doctor is. They receive a report that the Doctor has disappeared with a weapon capable of destroying the Daleks and Time Lords alike, and the Visionary warns that they will all fall into darkness and it is the last day of the Time War and the Time Lords die today. The Partisan wonders if it is time, given the millions that are dying every moment, over and over again. The Lord President destroys her with a power glove and insists that he will not die, or allow Time Lord history to die. A member notes that one part of the prophecy talks of two survivors, two children of Gallifrey. It talks of them locked in a final confront, and the Lord President realizes it refers to the Doctor and the Master. There is also a constant reference to Earth, and the Visionary mutters the word repeatedly. The Lord President laughs in triumph as he realizes that their salvation lies on Earth.
On modern-day Earth at the mansion, the Master and his transformed human minions tie up the Doctor and Wilfred. The Master then coordinates with the billions of human-Masters, putting himself in charge of earth defenses. He plans to turn the planet into a warship and Wilfred protests. His mobile phone rings and the Master wonders who can be calling, since he knows that none of his billions of selves are calling. As he searches Wilfred for his mobile, he finds his revolver and casts it aside. Finally he finds the mobile and discovers that Donna is calling. He turns it on and Donna says that she hasn't changed, and Wilfred reluctantly explains that the Doctor changed her. The Master has his minions track her, and Wilfred yells at her to run. The Masters soon corner her and say that they're still starving. As they close in on her, Donna has more memory flashes of her life with the Doctor, and clutches at her head in pain as her brain burns. A burst of energy shoots from her, knocking out the Masters and rendering her unconscious,
Both Wilfred and the Master wonder what happened, while the Doctor winks at the Master. The Master ungags him and the Doctor explains that he left Donna with a defense mechanism. In response, the Master asks for his TARDIS and the Doctor suggests that they travel together, wandering the stars. The Master talks of the noise in his head, and wonders if that will stop it. When Wilfred wonders what they mean, the Master explains that there has been a noise in his head, the sound of drums, since childhood on Gallifrey when he was forced to stare into the Untempered Schism.
On Gallifrey, the resurrected Time Lords, trapped within a time lock check the records and realize that the Master heard the sound of drums since childhood. The Visionary beats out the rhythm of the drums, a rhythm of four, and they realize it's the heartbeat of a Time Lord.
The Doctor suggests they found the source of the drums, but the Master realizes that the same noise now exists in the heads of six billion people. He laughs in triumphant as he burns up more of his body, and then asks about the Ood prophecy the Doctor told him about. The Master believes that the signal is coming from the end of time, and that he can use the six billion people to triangulate the signal. He demands the TARDIS once more and when the Doctor hesitates, he orders a guard to kill Wilfred. Wilfred tells the Doctor not to, and the Doctor notes that he's still overlooking the obvious: the guard is one inch too tall. The guard knocks the Master out and removes his helmet to reveal that he's Rossiter, one of the Vinvocci. Addams runs in and they free Wilfred. The Doctor is fastened too tightly and the Vinvocci wheel him out in his chair.
The Master wakes up and orders the other Masters to find the Doctor, sending his men to search the basement. Cornered, Addams activates a teleport device and they transport to their ship in orbit. They free the Doctor, who shorts out the teleport before the Master can follow. He then warns the Vinvocci that the Master will soon open fire with every missile he has and goes to the flight deck. When the Vinvocci threaten to leave since it's none of their business, the Doctor shorts out their controls and powers down the ship, preventing the Master from locating them. The Masters destroy the teleporter, stranding the Doctor. Addams and Rossiter complain that they are stuck in orbit. Wilfred figures the Doctor has a plan, but soon realizes that the Time Lord is out of options.
The Master marshals the forces of all six billion of himself to listen for the sound of the drums. They concentrate and realize that someone has designed it.
On Gallifrey, the Time Lords send the signal back into the distant past, to modern-day Earth. The Visionary talks of a falling star and the Lord President removes a glowing diamond from his staff and throws it into the time vortex.
Aboard the ship, the Doctor looks out the port and sees a falling star descend toward Earth. The Master senses it as well and sends his minions to find it. They locate the burning crater where the diamond, a white point star, has fallen. Upon receiving the news, the Master laughs in triumphant.
Aboard the Vinvocci ship, Wilfred seeks out the Doctor in the bowels of the vessel and gets lost. The Woman appears behind him and informs him that he is found. She warns that the day is almost upon them and asks if he's taken arms. He reveals he still has his revolver and wonders what he is supposed to do, and the Woman says that this is the Doctor's final battle and he must stand at arms or lose himself and the world. Wilfred wonders who she is, and she tells him that she was lost a long time ago. He looks down at the revolver and then looks up to discover that she has disappeared.
Wilfred locates the Doctor as he works on the heating and wonders if the Master changed the people in their graves. The Doctor blames himself and Wilfred talks of his time in the war. The Doctor notes that he's far older than him, and Wilfred offers him the pistol. The Doctor refuses and notes that Wilfred had it in the mansion and could have shot him then. Wilfred admits he was too afraid, and then notes that the prophecy of four knocks must refer to the Master killing the Doctor. He offers the pistol to the Doctor and suggests he kill the Master first, but the Doctor notes that's how the Master started. He admits that he's killed, and manipulating others into destroying themselves. When Wilfred asks what happens if the Master dies, the Doctor says that all of the humans will revert and Wilfred demands that he take the gun and put the six billion before the Master. Crying, Wilfred tries to make him take the gun but the Doctor refuses.
The Master contacts the ship on a general broadcast and informs them that the white point star fell from the sky and he has sanctified the gift. Now the star is his and he can increase the signal in his head as a lifeline. The Doctor realizes that a white point star is only found on Gallifrey, and the Time Lords are returning. Wilfred wonders if that's good news, and the Doctor takes the gun and runs to the flight deck.
The Master orders one of his Masters into the nuclear chamber and generates power to the white point star. He looks up to the sky and tells his people to come home.
Aboard the ship, the Vinvocci detect the rhythm on every single wavelength. The Doctor stares on horror.
Within the timelock, the Lord President realizes they have contact. He goes before the High Council and asks them to vote on whether they will die, or commit the ultimate sanction. All but two vote to come back.
The Doctor works desperately and explains that the Time Lords were changed by the Time Wars, and are more dangerous than any of his enemies. They can use the signal from something that was within the timelock to free themselves. The Doctor realizes that the salvage ship has asteroid lasers and repairs them, and orders the Vinvocci to work and Wilfred to man the lasers. When Addams points out that the ship can't move, the Doctor activates the ship. The Master gets a fix and prepares to fire, but the Doctor takes control and pilots the ship down through the atmosphere. He tells Rossiter and Wilfred to open fire on the missiles and they stop the first wave. The Masters fire another wave and the Doctor takes evasive action. A near miss blasts the viewscreen open, but the ship evades damage and they set course for England. However, the Master says it's too late.
The Lord President counts the vote and opens the portal to return to Earth.
The Doctor continues on course for England, and Addams wonders if he's going to stop. Wilfred returns to the bridge and mentions the prophecy, and wonders if this is when they die with him. The Doctor says nothing and holds the ship on course. At the last second he pulls up above the mansion, takes the gun, and drops through the hatch and falls through the mansion window and crashes onto the floor in front of the Time Lords as they arrive. He tries to aim the pistol at the Lord President but drops it. The Lord President hails the Lord Doctor and Lord Master and informs them they are gathered for the end.
Addams tries to regain control of the ship, and Wilfred demands that she land the ship. She reluctantly agrees.
The Doctor warns that the Master has no intention to save them, but the Master interrupts and explains that he can implant himself into every single Time Lord. The Lord President uses his gauntlet and transforms the six billion humans back to normal with a gesture. He then tells humanity to bow before the Time Lords. The Master reminds the Lord President that they still owe him for his rescue, but the Lord President says that something is approaching. As the planet shakes, the Doctor reminds the Master that the prophecy was that some thing was approaching, not some one. Gallifrey appears near Earth, shaking the planet with the gravitational forces.
Shaun and Sylvia run out into the streets, looking for Donna. As Shaun runs off, Sylvia begs the Doctor for help.
Wilfred runs into the mansion. Meanwhile, Addams prepares to leave and Rossiter wonders what will happen to the Doctor.
The Master insists that he is on the Time Lords' side, but the Lord President just smiles. Outside, the humans stare in horror as Gallifrey draws ever closer.
Wilfred arrives and enters the nuclear chamber to free the technician in the other chamber.
The Doctor warns that every degradation and travesty that the Time Lords created is coming, but the Master insists that it's his kind of world. The Lord President explains that they are initiating the final sanction, the End of Time, It will allow them to become creatures of consciousness, freed of any constraint. The Doctor admits he knew what they had planned to end the Time War, and that's why he stopped them. The Master begs the Lord President to come with them, but the Lord President dismisses him as a disease and prepares to stop him. The Doctor aims the pistol at him, coming to his old friend's defense. However, when the Master suggests that he kill the President and take command, the Doctor turns on him. The Master realizes that if he is dead, the Time Lords will go back when the link is broken. He doesn't believe the Doctor has the courage to pull the trigger, and dares him to shoot. The Doctor considers... and then turns and aims at the Lord President. As the Doctor considers, he sees one of the opposing Time Lords reveal herself as the Woman, crying. He turns and aims at the Master, and tells him to get out of the way. He then shoots at the link device, destroying it, and tells the Lord President, Rassilon, to return to Hell.
Gallifrey flickers and Rassilon prepares to kill the Doctor. However, the Master tells the Doctor to move and then fires a blast of energy at Rassilon in revenge. He uses the last of his life energy to cast Rassilon back into the void as Gallifrey disappears back into the timelock.
In the aftermath, the Doctor is surprised to find himself alive despite the prophecy. However, he hears four knocks and turns to find Wilfred, still trapped in one compartment of the nuclear vault. Wilfred asks to be released, noting that it's making a noise. The Doctor explains that it has gone into overload, and that all of the radiation will be vented into the compartment. if they touch the controls, it will flood. Wilfred tells the Doctor to abandon him, and the Doctor angrily blames him for going in there and getting stuck, because that's who he is: the Doctor's destiny. Wilfred insists that he's had his time and the Doctor yells, saying that he can do so much more and it's not fair. he then walks into the second compartment, ignoring Wilfred's pleas to stop and insisting that it's his honor. Wilfred steps out as radiation floods the Doctor's chamber. The Time Lord collapses in agony as the vault shuts down.
As Wilfred stares in surprise, the Doctor gets up and explains that he absorbed all of the radiation. The Doctor's cuts heal and he explains that the process of regeneration has started. Wilfred embraces him, crying.
Shaun and Sylvia tend to the unconscious Donna. They hear the sound of the TARDIS arriving and Donna wakes up. She wonders if she's missed something. Sylvia runs out, smiling. The Doctor bids Wilfred goodbye, but says that they'll meet one more time. When Wilfred wonders where he's going, the Doctor says he's going to get his reward.
Martha Jones and Mickey Smith, now married, are freelance alien hunters battling a Sontaran on Earth. It prepares to open fire on them from ambush, but the Doctor arrives to knock it out with a hammer. They look up and see the Doctor, who merely stares back at them for a few seconds before walking away.
Luke Smith is walking down the street and is almost hit by the car. The Doctor arrives and pulls him out of the way just in time. Luke recognizes him from the Dalek assault on Earth, and the Doctor turns and walks away without a word while Luke runs back to find his mother, Sarah Jane Smith. They watch as the Doctor waves and departs.
In a distant bar, Captain Jack Harkness is drinking alone. A bartender gives him a note and says it's from a man across the bar: the Doctor. Jack reads it and finds that it says "His name is Alonso." The Doctor gestures to the man next to Jack, Midshipman Alonso Frame from the S.S. Titanic,
and then leaves. Jack invites Frame to leave with him and laughs.
Author Verity Newman, the great-granddaughter of Nurse Joan Redfern
, is at a book signing promoting her story about how she fell in love with a man from the stars, Dr. John Smith. The Doctor arrives and asks for an autograph, and recognizes his name as the one from the book. He asks if Joan was happy in the end, and Verity tells him that she was. As he leaves, she wonders if he was happy.
Donna and Shaun are leaving their wedding and Wilfred leads the guests in a cheer. Donna poses for a picture while Minnie flirts with Wilfred and goes off to catch the bouquet. Sylvia looks back and sees the Doctor watching from the nearby woods. She gets Wilfred and they go to see the Doctor, and Wilfred wonders who the Woman was. The Doctor gives them a wedding present for Donna that he bought with a quid note from a man named Jeffrey Noble. Wilfred gives it to Donna and she discovers that it's a lottery ticket. She puts it away, figuring she might get lucky. Wilfred and Sylvia turn and watch as the Doctor departs.
Rose and Jackie Tyler are outside their flat in 2005, celebrating New Year's. As Rose walks away, she notices the Doctor standing in the shadows. Unable to see him, she asks if he's okay, and he confirms that it's the beginning of 2005, several months before he met her. He assures her that she's going to have a very good year. Cheered, Rose goes up to her flat. Once she's gone, the Doctor winces in pain and tries to get back into the TARDIS. He collapses and looks up to see Ood Sigma there. It informs him that the universe will sing him to his sleep. The Doctor gets up as on Ood Sphere, the Elder Ood leads his people in song.
Bolstered, the Doctor makes his way into the TARDIS and looks at his hand as it begins to glow. He sets the TARDIS to dematerialize and it leaves Earth. He mutters, "I don't want to go," and then his body glows with the energies of regeneration.
Regenerative energy shoots everywhere, devastating the TARDIS interior. The Doctor's features change, warp, and a new man stands there. The 11th Doctor checks his body and realizes that everything is more or less intact... and that the TARDIS is plummeting toward Earth. Screaming "Geronimo!", the Doctor prepares for re-entry.