Luke Rattigan and his students toss out reporter Jo Nakashima along with her notes. She protests, saying that she's investigating ATMOS and Luke is involved. He isn't interested and lets her leave. However, he goes inside and contacts an unseen ally, suggesting that they dispose of Jo. The ally agrees. Jo is working for UNIT and tries to get hold of them while letting her ATMOS system provide her with instructions. She follows them only to find herself at a river. When she tries to override the system, it looks her in and then drives the car into the river.
Donna is navigating the TARDIS for the first time with mixed results when the Doctor gets a call on his mobile phone. It's Martha, who needs him on Earth. He lands the TARDIS there and introduces Donna to Martha. Much to his dismay, the two get along and start talking about him in less than flattering terms. Martha announces her engagement and then asks the Doctor to come with her to an ATMOS factory where UNIT is conducting a raid. She's now working with UNIT and they suspect something alien is involved with ATMOS. Luke's secret ally is watching the UNIT troops as they move in, and isn't impressed.
Martha introduces the Doctor to Colonel Mace, who knows about the Time Lord from UNIT files of the 70s and 80s. The Doctor isn't impressed either with the overly military "new" UNIT or they're handling of the civilians. Mace explains that 52 people all died of poisoning at exactly the same time across the world, while Martha confirms there's no trace of the poison in their bodies. All of the victims drove ATMOS car: ATMOS is a combination GPS and emission-reduction system marketed worldwide by Luke Rattigan. UNIT suspects that the technology is alien in origin.
UNIT soldiers search the factory and Privates Harris and Gray find a secure area guarded by two factory workers. Luke's unseen ally orders the workers to let the UNIT soldiers in. Gray and Harris find a metal vat filled with liquid, and a partially-formed human briefly rises up. Gray figures it's a cloning facility and they try to call for reinforcements. A squat armored figure wearing a helmet appears out of nowhere and incapacitates first Gray and then Harris after rendering their guns non-functional. The figure orders the factory workers in and tells them to process the soldiers, then removes his helmet to reveal an alien face. He declares that he is General Staal of the Tenth Sontaran Battlefleet.
The Doctor examines the ATMOS equipment and concludes that it is advanced but not alien technology. He notes that he didn't expect Martha to work for the military but she points out that he left her, and she is working with UNIT on her own terms. Donna has been using her own unique skills to go over the personnel records and determine that there have been no sick employees in months. The Doctor wants to go see Luke, as the creator of the ATMOS system, and Mace assigns him a private, Ross Jenkins. Meanwhile, Donna and Martha chat and Martha notes that her family suffered because Martha didn't tell them about her involvement with the Doctor.
Harris and Gray are hypnotically programmed and Staal sends them on a mission then teleports back to his ship. The Doctor prepares to go the Rattigan Academy and Donna says that she's going home. He babbles on about how he'll miss her until he figures out she's just going home to talk to her mother and granddad. Meanwhile, Martha talks to a factory worker but finds him a virtual automaton with a rapid heart beat. She goes to find Mace, and Gray and Harris offer to escort her to the Colonel. They take her to the basement and lock her in the cloning chamber.
Donna returns home and explains where she's been to Wilfred. He takes it well, but warns her not to tell Sylvia, Donna's other. When Sylvia comes in and demands to know where Donna is, Donna just says she's been traveling.
The Doctor and Jenkins travel to the Rattigan Academy, and the Doctor notes that even UNIT jeeps have the ATMOS system. Jenkins notes that until the system has been proven dangerous, the government has refused to remove ATMOS. They arrive at the Academy and meet Luke. The Doctor checks out the science labs and then goes to Luke's reception area, which contains a large piece of tunnel-like sculpture. The Doctor notes that Luke couldn't have created the equipment in the science labs. He triggers a control on the "art," revealing that it's a teleportation pod. He arrives on the Sontaran spaceship and as they notice him, he quickly teleports back down. General Staal makes it through before the Doctor can sabotage the pod, and removes his helmet. The Doctor, realizing who he's up against, taunts Staal about his honor and then bounces a ball off of the wall behind Staal and into his probic vent: the Sontarans' one weakness. Staal collapses, stunned, and the Doctor and Jenkins make their escape. Staal recovers and fixes the teleporter, then returns to his ship with Luke. He has his second-in-command Commander Skorr, begin the invasion.
Skorr teleports down to the factory and confronts a captured Martha, saying they need something more sophisticated than hypnotic programming to use her abilities. He renders her unconscious and begins transferring her memories into a clone.
Staal realizes that he is dealing with the Doctor, the last Time Lord. He tracks the Doctor through the ATMOS device in the jeep, and drives it into the river. The Doctor manages to override the device by commanding it to do what it's doing anyway so it will disregard his orders and do the opposite. It stops just short of the river and the Doctor and Jenkins jump out as the ATMOS device burns out. With ATMOS destroyed, Staal assumes that the Doctor is dead and confirms with Skorr that the Martha clone is ready. Luke assures him that the initial test run resulting in the 52 dead car drivers was successful and they are ready to unleash ATMOS on a wider scale.
The Doctor goes to pick up Donna while Jenkins finds a vehicle without ATMOS so they can get back to UNIT. Wilfred and Sylvia both recognize the Doctor from their previous Christmas encounters with him. The Doctor calls UNIT and ends up talking to Martha. She promises to pass on his warning about the Sontarans but tells Moss that everything is fine. The Doctor then examines the ATMOS in Donna's car and triggers a hidden device exposing gas nozzles. The Sontarans detect the activation and Staal realizes the Doctor is still alive. He orders the invasion to begin and the Sontaran ships close in.
The Doctor realizes the gas is poisonous and that there are over 400 million cars on Earth with ATMOS. Wilfred tries to move his car just as the Sontarans deadlock every vehicle. He's locked in as his car fills with gas, and the other 400 million cars all emit their poisonous fumes. The Doctor looks on in horror as the gas spreads across the planet, while the Sontarans and Luke begin a war chant declaring their inevitable victory.