The planet Saturnia Regna has been purchased by GrayCorp, which intends to transform it into a giant theme park, Kursaal. The ecological activists known as HALF are sabotaging the project, and as a token gesture of concern Maximilian Gray has funded an archaeological dig to unearth the past of the planet. He accompanies the team in person to test a new invention from the R&D division, a com-link which traces life signs even underground. Under the leadership of Professor Amy Saraband, the team unexpectedly locates an ancient underground cathedral -- but Gray still tells them to finish their work within a day before the excavators are sent in. Before he can leave, the team is attacked by a wolf-like creature which slaughters Amy’s fellow archaeologists. Amy is knocked unconscious, but Gray manages to shoot the creature before being overpowered. Kadjik, Kursaal’s head of security, is forced to interrupt his ongoing investigation to respond to Gray’s distress call. Kadjik had found evidence that the media team reporting on HALF’s activities were being alerted to the planned disruptions in advance -- so why were they caught up in the explosion which killed them?
The Doctor and Sam arrive in the archaeologists’ tunnel systems, having aimed for Kursaal and materialized five years too early. While exploring they stumble across the archaeologists’ bodies and are caught by Kadjik and his team, but they manage to bluff him into believing that they’re the pathologists called in on the case. The Doctor makes a show of studying the bodies and is surprised to find that none of them are suffering from rigor mortis yet. He and Sam are forced to accompany the bodies to the hospital to maintain their cover, and upon arrival the Doctor asks Sam to keep an eye on Amy while he conducts an autopsy. Kadjik believes that HALF is responsible for the attack and for the murder of the media crew, but the Doctor isn’t convinced; if HALF intends to draw media attention to Kursaal to shut down the project, why kill the very people reporting on those activities, and the archaeologists whose work could have resulted in the planet being declared a Heritage Site?
At that point, the real pathologist shows up, but the Doctor manages to escape before Kadjik can confront him. Kadjik concludes that the Doctor must have been the mysterious leader of HALF, Bernard Cockaigne, and when he learns that Amy left the hospital along with the Doctor’s assistant he concludes that Amy must also be working for HALF. In fact, she is, and she takes Sam to meet the real Cockaigne, who reveals that Amy was helping him to find evidence that Saturnia Regna was the last home of the now-extinct Jax species and thus worth preserving from GrayCorp. But Amy is still wearing her comm-link, and Kadjik is able to use Gray’s link to track her down and locate HALF’s secret headquarters. He sends in the excavation machines to dig them out, and Amy tarries too long in their path, trying to save a datacube with important information on it. She manages to pass the cube to Sam but is crushed to death by the oncoming excavators.
The Doctor shows up in a stolen hovercraft and rescues Cockaigne and fellow activist Claire Johnson. Kadjik captures Sam and takes her back to the hospital for interrogation, but Cockaigne manages to convince the Doctor to postpone rescuing her until they’ve found out what really happened at the dig. Sam’s interrogation is interrupted when Kadjik learns that several of the bodies have disappeared from the morgue. Assuming that the activists have stolen the bodies, he takes Sam with him to confront her with the evidence -- but when they arrive at the morgue they find the two attendants being mauled by wolf-like creatures which are still dressed in the tattered remains of the dead archaeologists’ clothing. Kadjik shoots the creatures and leaves Sam in the custody of his assistant Porlock while he returns to the dig to question the Doctor. But the wolves recover from their gunshot wounds and kill Porlock, and Sam manages to escape.
The Doctor, Cockaigne and Johnson enter the tunnel system, and find both the buried cathedral and the body of the wolf-creature which killed the archaeologists. The Doctor concludes that the creature is the leader of the Jax, which may not be extinct after all. Cockaigne finds a GrayCorp excavation bomb planted in the cathedral site, and Johnson returns to the flitter to make sure it’s ready for takeoff while the Doctor translates the Jax hieroglyphics on the walls of the cathedral. The Jax wolves arrive at the site, and kill Johnson, and the Doctor seals off the entrance to the cathedral to save himself and Cockaigne before realizing that the Jax are following an instinctive drive to return to the cathedral, their ancestral home. Cockaigne manages to defuse the excavation bomb, but then Kadjik arrives with a squad of guards who kill the Jax drones, and informs them that there is a second bomb primed to bring down the tunnel system. As they emerge from the tunnels with Johnson’s body, it begins to transform into a Jax, and the Doctor realizes that exposure to moonlight triggers the transformation. But while the bodies of the dead simply transform into mindless drones, Gray was attacked and infected while still alive...
Gray has checked himself out of the hospital and returned to his offices, and Sam follows him to confront him with the evidence from Amy’s datacube. Amy had discovered that Gray was secretly funding HALF in order to drive Kursaal into bankruptcy, so he could purchase it through a shell company and complete the work without having to pay the accumulated debts from its construction. The media crew had discovered the truth, which is why he arranged their murder. But now, thanks to his encounter with the Jax, he has another agenda. He opens the window of his office to expose himself to the moonlight and fully transforms into the new Jax leader, but when he attacks Sam she stabs him with his own letter-opener. Kadjik arrives with the Doctor and Cockaigne just as Gray falls out the window to his death fifty stories below, and while Kadjik is occupied with the aftermath, the Doctor and Sam manage to slip back to the TARDIS.
Sam asks the Doctor to take her fifteen years into the future to see the completed Kursaal, but shortly after arriving they are injured in a drugs-related bombing. Sam is concussed and taken to hospital, where the Doctor loses track of her. He uses an I-card he stole from Kadjik during his first visit to track Sam down through the security system, and is surprised to learn that following Gray’s death Kursaal was bought by a cartel which has since been using it as a major drugs distribution point for this sector of the galaxy. Kadjik is still the head of security, and he is involved in a major sting operation intended to close down Kursaal’s drugs problem for good. But Kursaal has another problem -- Jax drones have been appearing at the rate of about two per year, and the management has been covering up the incidents and putting the drones in the ZooPark. Sam’s name is listed in the Jax-related files... and is clearly marked “DANGER”.
The Doctor finds that Cockaigne is now employed by Kursaal and manages to contact him, but Cockaigne -- who is now a terrified recluse -- refuses to discuss anything with him over an open channel. As the Doctor prepares to set off and speak with him in person, he finds the body of a secretary torn apart outside the office he was using -- and next to the body is a terminal which someone has been using to monitor the Doctor’s activities. Whoever it was now knows where Cockaigne lives. At that point Kadjik arrives at the hospital to investigate the use of his I-card, which he had left active in the hope that the Doctor would one day return and use it. The Doctor manages to evade him, but is delayed for too long; by the time he reaches Cockaigne’s apartment Cockaigne has been savagely murdered. And when the Doctor looks out of the window he sees Sam leaving the building, apparently the captive of two Jax drones. The Doctor follows them to the Jax History ride, where he tries to rescue her -- but Kadjik arrives and rescues him, barely in time, before Sam can do to the Doctor what she did to Cockaigne. She didn’t fight Gray off at all fifteen years ago; he infected her, and she is now the Jax leader, awaiting moonlight for her final transformation.
Kadjik sends his assistant Bandros to fetch reinforcements while he and the Doctor follow the Jax. They are captured and taken to the cathedral, which is still intact below the ride. There, Sam reveals that the Jax are not the wolves at all, but the virus which causes the transformation. As night falls over Kursaal she prepares to open up the cathedral’s roof and let the moonlight complete her transformation -- but she finds too late that the construction of Kursaal has blocked the ceiling. The Doctor and Kadjik take the opportunity to escape, only to find Bandros’ mutilated body outside. Kadjik informs the Doctor that while he was in the cathedral he took the opportunity to re-arm the dormant excavation bomb -- and now he intends to trigger it remotely from a shuttle, destroying the Jax and blaming the destruction on the drug dealers.
The Doctor refuses to let Sam die and follows Kadjik to the shuttle, where they fight as Kadjik tries to pilot the shuttle out of range. The Doctor manages to damage the transmitter as the shuttle rises above the clouds -- and at that moment Sam steps out from hiding, kills Kadjik, and steps into the moonlight. But the “moonlight” is simply a projected image from the shuttle’s viewscreen, and she remains as she is. The Doctor takes advantage of her confusion to overpower her and lock her in the shuttle’s escape pod, but finds that due to the damage resulting from his fight with Kadjik the shuttle is about to crash back into Kursaal. He is unable to prevent the crash and is forced to flee in the escape pod with Sam. Once the shuttle’s damaged transmitter comes back within range of the excavation bomb, the bomb detonates, destroying the Jax cathedral and much of the surrounding theme park as well. The destruction of the Jax technology in the cathedral breaks its hold over Sam, and she returns to normal, with no memory of what happened during her possession.