Egypt, 1334 BC
As the Doctor returns to the TARDIS, parked inside a pyramid, his recent ally Queen Nefertiti goes with him and insists that he stay after helping thwart an invasion of alien locust. He tries to slip away but is interrupted when he picks up an emergency signal. Nefertiti grabs him and throws him into the TARDIS.
Earth, 2367 AD
The Doctor and Nefertiti arrive at the India Space Agency where Commander Indira informs them that an enormous unidentified spaceship is on a collision course with Earth. The ISA has received no response to their hails and plans to blow the spaceship when it is 10,000 kilometers from Earth in six hours. The Doctor decides that he needs help to deal with it.
African Plains, 1902 AD
The Doctor goes to the tent of big-game hunter John Riddell, who wondered what became of the Doctor since he let to get some licorice... seven months ago. When the Doctor tells him that he has found something intriguing to investigate, Riddell is eager to accompany him.
London, Present Day
Rory's father Brian has come by to fix the lights and makes it clear that he's not very impressed with his son. As Amy comes in, the TARDIS materializes around them and the Doctor tells them that he needs their help. He then materializes the TARDIS inside of the spaceship and goes out, and Amy and Rory try to break the news to the shocked Brian. The Doctor is angry that they've brought in a stowaway until he realizes that it's his fault. As Amy complains that it has been ten months since the last time they saw the Doctor, the corridors start shaking. A huge door opens ahead and the six people stare in shock as two ankylosauruses charge out.
The group flees ahead of the dinosaurs and finally loses them. The Doctor insists on preserving the dinosaurs even though Riddell would rather kill them. As Brian stands in shock, the Doctor starts looking around, unaware that someone is watching them on the security monitors. The Doctor finally locates a computer console and locates the primary engine cluster. However, when he asks the computer for directions to get there, the computer teleports the Doctor and the two people standing closest—Rory and Brian—directly onto what appears to be an ocean beach. The Doctor confirms that the air doesn't taste right while Rory realizes that the beach is humming. Realizing where they may be, the Doctor tells Rory and Brian to dig while he looks at the nearby rocks. Brian produces a trowel and soon uncovers a layer of metal beneath the sand.
In a hidden spaceship, the captain listens to the three men on the security monitors. When Rory refers to "the Doctor," he takes a particular interest and orders his robots to bring them to him.
Amy, Riddell, and Nefertiti start exploring and Amy realizes who Nefertiti is. She's less than impressed with Riddell, who she's never heard of. They locate a den full of sleeping baby Tyrannosaurus Rex and carefully move through without waking them.
The Doctor finds a computer panel hidden in the rocks and confirms that the "ocean" is actually a vast hydrogenerator for the ship's engines. He confirms that he can't shut down the ship's engines in time to prevent the missile attack and then tells Rory and Brian that the "birds" in the distance are actually pterodactyls. They run for it since the teleporter burned out when they arrived. The trio get into a cave just in time but hear something very large approaching them from the inside. Two giant robots emerge and inform the trio that they're very cross with them.
Amy, Nefertiti, and Riddell continue exploring and finds a central area that appears to have been abandoned. As they speculate that something wiped out the crew, Amy accesses a computer council and brings up the captain's log. She discovers that the commander was a Silurian, Bleytal. On the log, Bleytal explains that they've prepared a giant ark to evacuate representative species of dinosaurs and leave Earth before the approaching planetoid can collide with it and wipe out the planet's surface.
The robots take the Doctor, Brian, and Rory to their leader and the group encounters a triceratops. It smells the grassy residue on the golf balls that that Brian has in his pocket and nestles up to him until Brian tosses one of them down the corridor.
On the log recording, Bleytal explains that they've brought fifty different dinosaur species onboard the ark and that they should be able to reproduce successfully once they return them to Earth once the devastation has died away. Riddell and Nefertiti argue between themselves, arguing which turns to flirting, while Amy confirms that there are no Silurian lifesigns onboard. She compares the readings to the last time that there were Silurian lifesigns and discovers an anomaly: a small spaceship embedded in the center of the ark.
The robots take the Doctor and his friends to the spacecraft and send the Doctor inside while they guard Brian and Rory. The captain of the ship, Solomon, is crippled and confined to a couch. He tells the Doctor that Fate has brought him there and a beam sweeps over the Doctor. Solomon dismisses it as a malfunction and explains that he was attacked by raptors shortly after his arrival and lost the use of his legs before the robots could rescue him. Assuming the Doctor is a medical doctor, Solomon orders him to fix his legs. As the Doctor examines him, he asks Solomon about the dinosaurs. The captain immediately tells one of his robots to injure Brian. It does so and Solomon tells the Doctor that he doesn't like questions.
Rory uses a medipack that he's picked up to treat his father's injury, and the elder Williams surprises his son by thanking him. Amy calls and they compare notes on what has been happening. Meanwhile, the Doctor avoids talking about how he came onboard and carefully asks Solomon how he came to be on the ark. Solomon explains that he's a trader taking the dinosaurs to a colony world to sell for profit, and that his database scanner has completed value estimates on everything in the known universe. He consults the scan that he conducted earlier but is surprised to discover that the Doctor isn't listed in the computer records. The Doctor finishes restoring Solomon's legs as Rory tosses his cellphone through the gate. Amy tells the Doctor about the missing Silurians and he whispers to Rory to be ready.
Solomon stands up on crutches and thanks the Doctor, who asks him what happened to the Silurians. The trader explains that he had the robots release small groups of Silurians from hibernation. When each group refused to cooperate with him, the robots ejected them into space. A disgusted Doctor wonders why he's heading for Earth if he plans to sell the dinosaurs but realizes that Solomon has been unable to override the navigational coordinates. Solomon orders the doctor to do it but the Doctor warns him that ISA plans to destroy the spaceship when it comes in range and tells the trader to leave while he can. The trader assumes that the Doctor is bluffing but before he can do anything, the Doctor opens the gate, runs out, and tells the robots that Solomon wants a word with them. As they go inside, the Doctor runs off with Brian and Rory.
The robots soon realize that they've been tricked and go after the escapees. The Doctor spots the triceratops from earlier and leaps onboard, and Rory and Brian join him. However, the dinosaur doesn't move until the Doctor has Brian toss one of the golf balls down the corridor. The triceratops gallops after it, outrunning the slow-moving robots. However, when it skids to avoid a corner, it throws off its passengers. The Doctor locates another computer console and receives a transmission from Indira. He asks her for more time to save the cargo of extinct dinosaurs but Indira tells him that her first and only concern is the fate of Earth, and that the missiles will impact in thirty minutes.
While Riddell locates a weapons locker with stun weapons, Nefertiti talks to Amy about whether the Doctor has a queen. The big-game hunter continues flirting with her, suggesting she might want a man of action. They spot the Doctor on the internal cameras as he tries to find a way to save the ark. He confirms that the ship has no defense system and that they can't get to the control deck in time. Solomon and his robots arrive via teleporter and the trader admits that he's confirmed the Doctor's claim that ISA has fired missiles. He then demands that the Doctor gives him the one thing that he has that is priceless: Nefertiti. In return for the queen, Solomon will let the rest of them go. When the Doctor refuses to negotiate, Solomon has the robots kill the triceratops. The Doctor goes over to it and comforts it as it dies, and Solomon tells him that his robots will kill Rory and Brian next.
Amy, Nefertiti, and Solomon teleport in and Nefertiti offers herself. When the Doctor refuses to let her make the sacrifice, Nefertiti reminds him that she owes him her life for saving her people, overriding Riddell's objections. Solomon promises Nefertiti that he'll enjoy breaking her and then teleports back to her ship with Nefertiti and his robots. Meanwhile, the ship's sensors register the incoming missiles and the Doctor tells the others that they need to get to the control deck and turn the ship around.
Solomon tries to leave in his ship but discovers that the Doctor has magnetized the hull, pinning them in place.
As they reach the control deck, the baby T-Rexes move in and Riddell goes back to stop them. However, he discovers that he's seriously outnumbered.
On Earth, Indira and her people watch the missiles approach the ark.
The Doctor discovers that they can't turn the ark around because it requires to pilots on the same gene chain. Brian reminds him that he and Rory are father and son and the Doctor has them sit down. As he moves onto the next step of his plan, removing a component from the console, he asks Amy how her job is going. She admits that she quit because she's been unable to hold a job because she's always waiting for the Doctor to return and take her away. When she worries that he seems to be avoiding her and that his visits are growing further and further apart, the Doctor assures her that he's not trying to get rid of her. He finishes rewiring the controls and Riddell comes in and says he needs a second man to deal with the dinosaurs. Amy grabs a stun gun and goes with him, assuring him that she's worth at least two men. Meanwhile, the Doctor removes a glowing circuit cube and teleports away.
As Amy and Riddell fire on the attacking T-Rexes, Brian and Rory start piloting the ark away from Earth. However, the missiles are still homing in and will impact in seven minutes.
The Doctor teleports into Solomon's ship and short-circuits the two robots. When Solomon holds a laser scalpel to Nefertiti's throat and orders the Doctor to surrender, Nefertiti trips him. The Doctor explains that the control cube is emitting the signal the missiles are using to home in on the ark, and wires it into Solomon's ship. As the Doctor prepares to demagnetize the hull, Solomon begs the Time Lord to let him live. The Doctor asks him if the Silurians said the same thing before he killed them, and then tells him to look at the missiles and prepare to enjoy his bounty. As the Doctor and Nefertiti teleport away, the trading ship blasts free of the hull of the ark and flies out into space. The missiles change course and home in on it, destroying the ship as Solomon screams the Doctor's name with his dying breath.
Amy and Riddell finish stunning the last of the baby T-Rexes.
Later, the Doctor is ready to take everyone home. However, Amy and Rory ask him to take them home to London instead. Brian asks the Doctor for one favor before he returns home. Soon, Brian is sitting in the TARDIS doors, eating his lunch and looking down on Earth far below. Amy and Rory watch Brian, while the Doctor nervously eyes his two companions.
Back in Africa, Riddell looks up at the sky, a dinosaur tooth around his neck. A smiling Nefertiti emerges from the hunter's tent, carrying a Silurian stun gun.
Amy and Rory are back at home. As Rory works on the lights, Amy gets two postcards. One is from Brian, who is now traveling the world. The other is from the Doctor and has a picture of New Siluria and the dinosaurs... romping around the TARDIS.