British investigative journalist Catriona Talliser is interviewing Giltean separatists in the African country of Kebiria when a Jeep driven by Corporal Anton Deveraux of UNIT crashes nearby. His swollen body is leaking a honey-like substance which smells of cloves and rosewater, and his last words to Catriona are “dancing the code”. The Sakir Mohammad, leader of the FLNG, burns the body and tells Catriona a legend about the dancers of the desert, demons called Al Harwaz who laid waste to Kebiria centuries ago and started the conflict between the Gilteans and Kebirians. Though he fears that Al Harwaz have returned, his son Tahir and Catriona both find it more likely that the Kebirians are testing biological weapons in the mountains. Upon returning to Kebir City, Catriona calls UNIT in England and tells Mike Yates of Deveraux’s death. She then attends a press conference at which Prime Minister Benari and his science officer Sadeq Zalloua blame the disappearance of a thousand Kebirian troops on enemy action by the Gilteans and the Libyans. But when Catriona asks disturbing questions about biological weapons which could turn a man’s blood to honey, the press conference is called to a halt and Catriona is arrested for treason.
Yates wants the Doctor’s opinion on the satellite photographs which Deveraux had been sent to investigate, which seem to indicate that there is an alien presence in the mountains of Kebiria. The Doctor, however, has just built a machine which uses Venusian algorithms to predict the future, and has found that there is a high probability that the Brigadier is about to shoot both him and Jo in cold blood. The Doctor departs in the TARDIS to put distance between himself and his friends until he can find out more details about the prediction, and the Brigadier, unnerved, decides to let Jo accompany Mike’s team to Kebiria, also to put some distance between them. Upon arriving in Kebiria, however, the UNIT team is placed under arrest, and Jo ends up in the same cell as Catriona. Jo insists upon trying to escape, and manages to surprise her guard, but as they flee, Catriona panics and shoots a guard, killing her. Jo releases other prisoners to help them escape, including Giltean freedom fighters and freelance Arabian terrorist Vincent Tayid, who is now assisting the GAF in their struggle. They escape, but Jo is horrified to learn that Vincent is the man responsible for a recent Cairo bombing in which innocent civilians and children were killed.
Vincent takes Catriona and Jo to a Giltean camp outside official Kebirian territory, but soon after their arrival, the base is strafed by Kebirian jets and many civilians are killed. As the Gilteans struggle to recover from the attack, a second wave of attack helicopters approaches -- or so it seems until they get close enough to be revealed as giant alien insects. The aliens appear to be giant flying scorpions with tentacles, which sweep up everyone who is caught out in the open; Jo is captured when she intervenes to save Vincent from one of the creatures. As the aliens retreat, Vincent, struggling to make sense of what’s happened, concludes that the Kebirians’ American allies have made contact with aliens and supplied them as support troops to the Kebirians. Catriona takes her leave of him in disgust at his paranoia, but she is stopped at the Algerian border by guards who recognise her description and arrest her for the murder of the prison guard.
The Doctor’s Prognosticator warns him of Jo’s predicament, but when he tries to use it to locate her, he burns out the TARDIS navigational system. The Brigadier requests permission to take the Doctor to Africa to negotiate the UNIT team’s release, but the Doctor, impatient, sets off with him before official permission has been granted, and is shot down when he penetrates Kebirian air space. While looking for a safe place to crash, the Doctor spots an alien object in the mountains and learns of Deveraux’s investigations for the first time. Appalled by the size of the object, he sends the Brigadier on ahead to Kebir City while he investigates, only to be captured by the alien insects massing about the nest. The Brigadier, meanwhile, falls into the hands of the FLNG, who have seen what appear to be Kebirian soldiers near the alien mound -- soldiers moving faster than any human possibly could…
Jo awakens inside the alien hive, and is rescued from the insects by a Kebirian soldier named Akram who escaped when his platoon was captured by the aliens. A thousand men had been sent into the mountains, supposedly to attack the Gilteans, but they instead ended up in the hive, where they were transformed into honey-producing globes and replaced by duplicates. Jo sees that the Doctor has been taken prisoner and convinces Akram to help her rescue him, but Akram is killed while trying to distract the hive’s defenders. The Doctor and Jo discover that copies of UNIT soldiers are also being made, and try to flee to warn the outside world; however, they are recaptured, and the aliens begin to make copies of them as well.
Benari releases the UNIT troops and allows Yates to collect the Brigadier from the desert, but insists that they leave Kebiria at once, claiming that the infestation in the mountains is a purely internal matter. At first he also insists that Jo remain in Kebiria to stand trial for murder, but by the time Yates returns to Kebir City with the Brigadier, the Doctor and Jo are apparently waiting for them, claiming that all has been resolved. Meanwhile, the border guards bring Catriona back to the city, only to be captured by alien duplicates who are in the process of replacing the entire population of the city. Catriona escapes and flees to the airport, but before she can warn the UNIT team of the danger, the Doctor claims that she has been infected by an alien disease which is creating paranoid fantasies in her mind; he has already provided the Kebirians with a cure, but now he must return to England to mass-produce an antidote and save the world. The Brigadier decides to trust the Doctor, and the plane departs as Catriona is dragged away, screaming.
Once back in England, the Doctor and Jo seal themselves in the Doctor’s laboratory, ostensibly to begin work on the antidote. The Brigadier is becoming suspicious, however, and his fears seem to be confirmed when all contact is lost with Kebir City. American forces move into the area to investigate the loss of contact with their embassy, and while the Brigadier tries to stay on top of the situation, the Doctor and Jo start to lure UNIT soldiers into their laboratory, killing them and feeding their bodies to the insect creatures which the Doctor has been breeding. They then attempt to kill the Brigadier, but fail, and he is forced to fulfil the Doctor’s prophecy and shoot the two of them dead. Unsure whether the Doctor and Jo were duplicated or brainwashed -- unsure whether he has indeed killed his two friends -- the Brigadier has their bodies sent for an autopsy while he takes a platoon back to Kebiria. But the duplicates return to life in the morgue, kill the doctors and get back to work…
Back in the hive, the real Doctor and Jo are woken and taken to the alien control area, where Benari and Sadeq Zalloua request their help. Some time ago, Zalloua decided to investigate the legends of “Al Harwaz”, and found a dormant alien queen beneath the desert. Using pheromones to control the Xarax Queen, he was able to programme the other Xarax to carry out his instructions, and Benari ordered him to use the Xarax as weapons in the war with the Gilteans. However, the Xarax are incapable of distinguishing between different humans, and have started to attack the Kebirians as well. The Doctor tries to reprogramme the Xarax Queen himself, but before he can do so, the Brigadier and his men launch an attack on the hive, as do Vincent and the Gilteans. The Xarax use their helicopter insects to defend the hive, and the Brigadier has no choice but to order his men to bomb it. They do so, killing the Xarax Queen.
The Doctor, Jo and Benari escape from the hive before it is destroyed, but Benari is captured and shot by the Gilteans. The Brigadier brings the Doctor up to date, and the Doctor tartly informs him that, since the Brigadier didn’t incinerate the duplicates in Britain, they may already have begun building a second nest -- and since the Kebirian queen was destroyed before the Doctor could synthesise a pheromonal control, he has no way of shutting it down. To make matters worse, a fleet of Xarax helicopters approaches from the direction of Kebir City, accompanied by two Xarax copies of Harrier jets. There must be another nest in the city -- and the Xarax are copying any weapons used against them.
While the Doctor and the Brigadier head for the coast to catch a flight back to England, Jo, Mike and Vincent return to Kebir City to destroy the second nest. Their party gets behind enemy lines while the Xarax pursue the others, but Jo finds that her hands are starting to leak honey. She is unsure how far the change has progressed, and Vincent insists that they kill her before she betrays them. Mike stops him from doing so, and Jo, claiming to feel a call of nature, leaves the Jeep to get a moment’s peace -- only to be captured by Zalloua. Zalloua kills Vincent and takes Jo back to Kebir City as a hostage, telling her that this is what he had planned all along; to ensure total world peace, he has ordered the Xarax to replace the entire human race with duplicates. Upon returning to Kebir City, however, Zalloua himself is taken to be duplicated, and although Jo manages to escape she finds herself lost in a deserted city. The entire population has been processed by the Xarax.
The Doctor discovers that the Americans are planning to use nuclear weapons against the Xarax, and warns them that the Xarax will respond to any threat in kind. The Americans reluctantly agree to hold off until the Xarax actually reach their bases on the coast, giving the Doctor only four hours to return to England, synthesise an antipheromonal control, shut down the British nest and return to Kebiria to shut down the second nest. Back in England, regular army forces are seconded to UNIT to help retake its HQ, but they have difficulty taking the “alien” threat seriously and are easily overcome and duplicated. Benton and his men hide out in the training grounds in Henley Wood until the Doctor and the Brigadier arrive, and the Doctor has the men douse themselves in a clove-and-rosewater mixture in order to pass as Xarax duplicates. They enter UNIT HQ safely, but the Brigadier opens fire on the duplicate Doctor before the real Doctor can try to communicate with it, thus starting a battle between the Xarax duplicates and human UNIT soldiers. The Doctor finds a Xarax queen gestating in his laboratory, eats its honey, and calculates a pheromone combination which shuts down the hive. But he has only ten minutes left to get back to Kebiria before the Americans launch their missiles.
Due to the instincts she acquired from her partial processing, Jo is able to locate the Xarax nest beneath the city palace. The entire population of Kebir City has been transformed into honey-producing globes for the nest, and when the duplicated Zalloua catches Jo he tries to place her in the nest as well. But the globe which used to be Catriona recognises Jo, and saves her by rolling forward to crush Zalloua. The defenders of the nest then attack, and Catriona, atoning for the murder of the prison guard, gives her life to hold them off while Jo escapes. Jo tries to link herself to the nest queen as Zalloua had done, but is subsumed by the nest’s desperate need to defend itself. The American base on the coast is overrun, and the ships in the Mediterranean launch nuclear missiles at Kebir City -- but just as the Doctor had warned, the Xarax take down the missiles, analyse their construction, and prepare to meet the attack with equivalent weapons.
The Doctor discovers that the Xarax in Britain have built a copy of an experimental rocket plane, and uses the pheromonal chemicals he has developed to fly it back to Kebir City within minutes. Jo, sensing his presence, uses the Xarax to guide him to her, and he disconnects her from the Queen and uses his antipheromones to shut down the nest. Unfortunately, the last images they receive from the Xarax defenders indicate that a cluster of ICBMs is approaching Kebir City. With the last glimmers of her connection to the nest, Jo locates the organic radio control which linked the Xarax together, and the Doctor generates an EMP which scrambles the incoming missiles’ detonators, causing them to crash without exploding. He informs Jo that the Xarax were never intelligent to begin with; they were simply a biomechanical toolkit, possibly left on Earth by a benevolent alien species which didn’t realise they could be so terribly misused. Kebiria has been destroyed; only a few coastal cities remain out of a nation of millions. But even as the survivors begin rebuilding, the old hatreds between Kebirians and Gilteans surface again…
Source: Cameron Dixon