On Christmas on current day Earth, Wilfred Mott is out on the streets for Christmas when he has a sudden flash of someone laughing. Shrugging it off, Wilfred notices a nearby church and goes inside. He looks up at the stained glass windows and notices on one of them, the image of a small blue box with a light on top. A woman behind him explains that people call it the Legend of the Blue Box, and the church was a site of the convent in the 1300s. According to the legend, a demon fell from the sky and a man in a blue box, the Sainted Physician, came and smote the demon and then disappeared. Wilfred dismisses it as a coincidence but admits it would make his Christmas if the legend came back. When he turns, he discovers that the woman has disappeared. As he looks at the window again, Wilfred hears and sees the same laughing man in his mind.
The Doctor arrives on the Ood Sphere and finds Ood Sigma waiting for him. He admits that he stopped on a tour of the galaxy first, and the Ood says he shouldn't have delayed. The Doctor admits that the last time he was there, the Ood predicted his death and he was in no hurry to return. Ood Sigma takes him to their city, and when the Doctor confirms they've developed it in only a hundred years, he realizes that something is accelerating the Ood civilization. Ood Sigma says that the mind of the Ood is troubled and they have bad dreams every night.
The Ood Elder predicts that someone or something is returning, but it is far too late. The Doctor enters and is invited to share in the dreaming, and they all link hands. The Doctor sees the laughing man, and the Ood Elder explains that the man comes to them every night, and everyone in the universe dreams of him. The Doctor insists that he's dead, but the Ood Elder says that there is more. The Doctor sees a vision of Wilfred, and the Ood Elder says lines of convergence are being drawn on Earth. They then show the Doctor images of a couple the Doctor doesn't recognize, and Lucy Saxon. The Doctor explains the man is the Master, a Time Lord like him, and shows them images of when the Master married Lucy, corrupted her, and conquered Earth. However, Lucy remembered and killed the Master, and the Doctor burned his body. The Ood Elder notes that the Doctor didn't confirm the Master's death, and reveal that a woman recovered the Master's ring. However, a greater shadow is stirring over creation, and time itself is bleeding. The Ood's eyes glow red and the Ood Elder says that something is changing and threatens to change the future and the past, causing the end of time itself. As the Doctor runs back to the TARDIS, the Ood Elder notes that things that have happened, are happening now.
On Earth at Broadfell Prison, Lucy is taken to meet with the new prisoner governor, who explains that the old governor met with an accident that they arranged. She orders her assistant, Miss Trefusis, to prepare, and then congratulates Lucy on keeping her silence during her trial concerning the death of John Saxon. The governor forces Lucy to kneel and explains that John Saxon made preparations in case of his death. She holds out the Master's ring and says that he will return that very night.
At home, Wilfred looks out at the gathering storm.
The governor prepares a ritual involving the ring, and ignores Lucy's warnings. Trefusis then takes a bit of her lipstick containing the Master's biometric imprint and uses it to complete the ritual. A tornado of energy springs up into the sky, drawing energy from the governor and the others. Lucy warns that the Master lied to them, but the Governor shouts out John Saxon's true name. The Master appears in the light vortex, insisting he will never die. He reaches out to Lucy, who warns that his followers are dying. Unconcerned, the Master warns that they will only be the first, and soon all humanity will join them. The Master complains that he can still hear the drums, and he has missed them. Lucy says that she and her people have prepared, and unleashes a hidden potion that will undo the ritual. She throws the liquid into the energy vortex, causing a huge explosion.
The Doctor arrives at Broadfell Prison, only to discover that it lays in ruin.
The man from the Ood's vision, Joshua Naismith, is watching footage of the explosion's aftermath. His daughter Abigail comes into his office and Joshua explains that someone survived. Abigail wonders if it is him, and believes it would be a great Christmas present. Joshua and Abigail go to a sophisticated control room and he tells his scientists to prepare the gate. They activate an archway which glows with energy.
Wilfred goes out for Christmas and then calls someone to tell them that they're mobilizing. A tour bus filled with his fellow pensioners arrives and Wilfred joins them. He describes the Doctor and the TARDIS to them and explains that they have to find him. However, he can't tell them who the Doctor is, but insists that he can cure their bad dreams, the dreams they can't remember.
Tommo and Ginger are getting food and a man in a hoodie comes up behind them. He approaches the vending cart and demands everything, and removes his hood to reveal that he's the Master, with a shock of blonde hair. A few minutes later, he jumps down behind Tommo and Ginger and wolfs down his food. He then demands more food and Tommo suggests they leave. Ginger notes that the Master looks like John Saxon, and they realize he is. As they try to leave, the Master rants that the Doctor can sniff him out anywhere, and his flesh flickers on and off. Tommo and Ginger run to the vending cart and discover that the serving woman has been reduced to a smoking skeleton. The Master leaps high into the air and comes down at them.
Some time later, the Doctor arrives and the Master realizes that he's near. He uses a piece of pipe to pound on a metal drum, and then runs off as the Doctor approaches. He pauses on a hill and screams at the Doctor, then leaps high into the air, comes down, and continues running. The Doctor warns that he's burning up his own life force, but the Master laughs and continues. Wilfred and his friends arrive as the Doctor realizes that the Master has escaped. Wilfred admits that he didn't tell them who the Doctor really is. They all pose with the Doctor for photos, including the flirtatious Minnie. They then drop the Doctor and Wilfred off at a cafe and Wilfred makes small talk. Finally, he admits that he keeps seeing the Master's face. The Doctor wonders how Wilfred found him, and why they keep meeting. He tells Wilfred that he's going to die, and there are times when even regeneration can't save him. And if it does, it's still a new man.
As they talk, the Doctor notices Donna outside, getting into her car. Wilfred begs him to bring back his granddaughter's memories, but the Doctor warns that Donna will die if she ever remembers him. They watch as Donna argues with a parking meter maid, and then meets with her fiancé, Shaun Temple. Wilfred explains that Shaun is nice enough, but all they can afford is a small flat. He sees the look on Donna's face sometimes, like she's and doesn't know why. Wilfred asks the Doctor who he has, and the Time Lord admits that he's traveling alone. He thought it would be better, but some things went wrong. Wilfred insists that the Doctor needs Donna to make him laugh again, and the Doctor admits he's right. They leave the cafe and the Doctor walks away.
The Master lurks in the darkness, gnawing at a bone.
The Doctor stalks the wilderness, trying to find his old friend and save his own life.
The Naismith's toast their success, as their scientists work to activate the gateway.
The Doctor finally locates the Master, who turns to face him, his hands crackling with energy. He releases it at the Doctor, who keeps walking until finally the Master strikes him directly in the chest. Staggered, the Doctor collapses and the Master holds him briefly, then lets him drop to the ground. He talks of his estates at home, and the Doctor warns that he's using up his energies and feeding on himself. The Master talks of Christmas feasts and starts rambling, and the Doctor wonders what would happen if he asks for help. He admits that something is returning, something more that will bring about the end of time. The Master says that the noise in his head is stronger than ever before, and it hurts. He tells the Doctor to listen and grasps his head, and the Doctor realizes there's something inside of his head. The Master flies off into the sky and the Doctor runs off after him. He finds the Master, who says he's been right after all these years, and wonders what is calling him. A glowing light appears in the sky and a helicopter drops men off to grab the Master, sedate him, and leave. They open fire on the Doctor, who tries to stop the abduction, and then knock him out.
The next morning, Wilfred opens his Christmas present from Donna and discovers that it's a book, Fighting the Future
, by Joshua Naismith. Donna and Sylvia exchange present, and Donna admits that she thought the book was the kind of present that Wilfred should have, but she doesn't know why.
Joshua has the Master brought to him and tells him to congratulate Abigail, who has heard rumors of Saxon's return. She insists that they need Saxon. and the Master smiles and licks his lips.
Shaun arrives with his presents as the Queen comes on for her speech. As Wilfred sits down, he sees the image of the woman from the church. She addresses him directly, saying that things are advancing too quickly. Only he can see them, and the woman says that Wilfred stands at the heart of coincidence. She warns that he has failed, and notes that he has never killed a man. Wilfred insists that it is no shame, and the woman warns that he will soon have to take up arms. She advises Wilfred not to tell the Doctor anything in the hopes that his life can still be saved.
Once she disappears, Wilfred goes to his room and takes out his Army pistol. He looks out the window and sees the Doctor arriving in his TARDIS, and comes out after him. The Doctor admits that he's lost the Master, and asks if Wilfred has seen anything strange. Wilfred hesitates, and then shows the Doctor the book with Joshua's face on the cover. The Doctor recognizes him from the Ood's vision, and realizes that Donna's subconscious is still trying to warn him. Sylvia comes out, recognizes the Doctor, and warns him to leave before Donna sees him and remembers. He quickly leaves and Wilfred goes after him, and Sylvia runs after her father. Donna comes out and wonders where they all are. The Doctor dematerializes before Sylvia can stop them and Donna can see them, and Donna comes out to wonder why Sylvia is shouting at thin air.
Inside the TARDIS, the Doctor homes in on Joshua Naismith, and explains to Wilfred that he can't go back in time to try and recapture the Doctor.
Joshua and Abigail bring the Master to the gateway room and have their scientists provide a demonstration. They know he's not from Earth, and admit that neither is the gateway. One of the scientists, Rossiter, says he has to go to the basement to check some calibrations, and asks permission to take Addams to go with them. Once they're alone, they both wonder who Saxon is. They are aware of Earth's historical records, and "Addams" deactives her shimmer field, reverting to an alien form. Rossiter does likewise, and they wonder if Saxon is the expert they were told about. They figure they can use Saxon's knowledge to hijack the gate, just as they always planned.
Joshua explains that Torchwood found the gateway, and Joshua acquired it when Torchwood fell. Joshua has food brought in for the hungry Master and he gorges himself on it while Joshua and Abigail stare at him in horror. Joshua then explains that the gateway came with a nuclear vault, and the gateway has some kind of regeneration function. A burned scientist was entirely cured by the gateway. Joshua believes that if the Master can repair it, he can use the "Immortality Gate" to give Abigail eternal life. The TARDIS arrives nearby and the Master senses it, and goes to work.
The Doctor and Wilfred emerge and the Doctor places it out of sync, making it impossible to find. They then sneak through the compound past Joshua's private army.
Rossiter and Addams watch as the Master complete the repairs on the gate. The Doctor and Wilfred arrives, and the Doctor immediately realizes they're using a shimmer and threatens to reveal them if they reveal him. When Addams tries to bluff, the Doctor deactivates the shimmer field. Rossiter goes to investigate, while the Master operates the gateway. Joshua has him restrained and warns that he'll never be allowed near the Immortality Gate.
Rossiter arrives as the Doctor realizes something is going on. He demand answers about what Saxon is doing.
Joshua assures the Master that he'll double-check everything the Master has done four traps and explosives.
Addams and Rossiter explain that they're a salvage team, and they'll transport the gateway to their ship when it's completed. The Doctor is sure that the Master will do something, and Wilfred wonders why it is so large. Addams explains that the device mends entire planets, transferring a medical template across an entire planet. Realizing what that means, the Doctor runs for the control room.
The world prepares for the U.S. President's announcement that Joshua has found a way to cure humanity of its ills. The Doctor runs into the control room and tries to warn them, but the Master frees himself with a burst of energy and leaps into the Immortality Gate. Everyone is overcome by their dreams of the Master. The Doctor is unable to shut down the gate because the Master locked it. He enters the nuclear vault and adjusts the control, and Wilfred enters the adjoining chamber so the Doctor can leave. Rossiter and Addams realize that the Doctor has set the template for human.
Donna calls Wilfred and tells him that Sylvia and Shaun are stunned by their dreams, but she's affected. One of Wilfred's friends, Winston, calls to inform him that everyone is falling under the Master's spell. A huge burst of energy spreads out from the gateway across the planet. The Doctor, Wilfred, and Donna look on as everyone around them is transformed into... the Master.
In her flat, Donna begins to remember her time with the Doctor, and she collapses in pain.
All of the transformed humans confront the Master, while the Master on the newscast announces that everyone on the screen is he. He boasts to the Doctor that there is no human race: now there's only the Master race. Across the world, the Masters laugh in triumph.
On the planet Gallifrey, the Time Lords have gathered thanks to the Master's unwitting efforts, and declare victory and the end of time itself.