When Sarah’s associate Jeremy Fitzoliver disappears, nobody at work particularly cares. However, Sarah investigates on behalf of Jeremy’s worried mother, and soon finds that Jeremy has joined a New Age cult near Hampstead Heath. The cultists worship a being called the Skang, and at their ceremonies, they share a drink that makes them suspiciously happy. Sarah recognises their leader, Alex Whitbread, as a former right-wing government official who was fired for corruption, but Brother Alex refuses to discuss his change of heart and haughtily informs Sarah that their group’s founder, Mother Hilda, is currently in Bombay. He refuses to let Sarah take his photograph or let her into the inner sanctum, but Sarah later climbs out onto the building’s second-storey ledge and snaps a photograph of the sanctum -- which seems to contain a strange, demonic statue of a reptilian insect creature with a large proboscis.
Sarah’s editor, Clorinda, refuses to authorise a full investigation, but Sarah takes a sample of the Skangites’ drink to UNIT HQ for the Doctor to analyse. At first, he is more concerned with his attempts to communicate telepathically with goldfish, but when he sees her photograph of the Skang statue he agrees to analyse the liquid sample. Sarah returns to her office, but can’t concentrate on her work and ends up leaving late with her assignments unfinished. As she crosses Hampstead Heath on her way home, she realises that she’s being followed -- and when she catches a glimpse of her pursuer, she recognises it as the Skang. Fortunately, the Skang is frightened off before it can attack her by the sudden arrival of an old man walking his dog. Meanwhile, the Doctor visits the Hampstead Heath police station to ask whether they have found any emaciated bodies in the vicinity; they have indeed found several bodies reduced to mere skin and bones, and they demand to know what the Doctor knows about the situation. He is eventually forced to call on Sergeant Benton to bail him out.
The next morning, the Doctor confirms that the cultists’ drink contains a psychotropic drug, and the Brigadier agrees to investigate the possibility of alien involvement. However, the Skangites have packed up and left, presumably planning to join their fellows in Bombay. Sarah calls in her vacation time at work and joins the Doctor and the Brigadier, who intend to take the TARDIS straight to Bombay; however, the ship’s temporal governor is playing up, and after a couple of failed attempts to reach Bombay it nearly flings them all into the timeless space before the Big Bang. The Doctor manages to get them back to UNIT HQ, where the irritated Brigadier books them passage to Bombay via British Airways. The Doctor takes the temporal governor with him in order to conduct repairs, and on the way, he tells Sarah that the creature in her photograph resembles certain insects that inject their digestive fluids into their victims, liquefy their internal organs, and literally drink their victims alive. There is no need for him to explain that the “statue” in the cult building was not a statue, or what happened to the emaciated bodies on the Heath.
Jeremy is no longer enjoying himself; Bombay is crowded and smells funny, and he’s expected to sleep in a crowded dormitory with the common folk. He decides to complain to Mother Hilda, but while making his way towards her private bungalow, he overhears an argument between her, Brother Alex, and Brother Will (formerly boxing champion Will Cabot). Though Jeremy doesn’t understand the point of the conversation, it’s clear that Mother Hilda and Brother Will are upset about Brother Alex’s actions in England, which have resulted in the corpses on Hampstead Heath -- and when Brother Alex challenges Mother Hilda’s right to judge him, she decides that the time has come to deal with his arrogance. Aware that Jeremy is hiding nearby, she calls him out, but does not punish him for eavesdropping; rather, she offers him a drink of the same drugged fruit juice that was passed out at the ceremony, and once he drinks this, Jeremy stops complaining and happily returns to the dormitory.
The Doctor, Sarah and the Brigadier arrive in Bombay. As the Doctor and the Brigadier argue about how to investigate without giving themselves away, Sarah acts on her own by visiting the cult’s public shop. Brother Dieter and Sister Helga tell her that it’s too late for new devotees to join, but they give her a copy of Mother Hilda’s book, The Way of the Skang. The Doctor recognises the author’s photograph; she is Hilda Hutchens, the 1970 Nobel Prize winner for philosophy, and when the Doctor knew her, she was an ardent sceptic and rationalist. Meanwhile, the Brigadier contacts his Indian counterpart, Major Chatterjee, and convinces him that the Skangites pose a threat; however, as it is not an immediate threat, they must proceed through the Indian bureaucracy to obtain permission for a raid, and the Skangites are already preparing to leave Bombay in a cruise liner for a mysterious destination.
Brother Alex has managed to convince some of the Skangite inner council that Mother Hilda is trying to discredit him in order to secure her own grip on power; however, his allies are few, and the evidence against him is more damning than he’d led them to believe. When the extent of his crimes is made clear, his allies refuse to stand with him; too late, he realises that he’s gone too far, and Hilda has him excised from the group. As the council session comes to an end and what’s left of Alex is removed from the bungalow, one of the Skangites passes on word that the Doctor has arrived at the compound and is asking to speak with her. Hilda often engaged in philosophical debates with the Doctor before founding the way of the Skang, and she lets her old friend in so as not to raise suspicion. The Doctor probes for information without trying to seem to obvious, trying to find out how a rational sceptic could become such a devoted follower of the Skang; however, Hilda sees his questions for what they are and politely dismisses him -- and, once he’s gone, she tells Brother Will that there is to be a change of plans.
Sarah sneaks into the compound and contacts Jeremy, claiming that she’s joined the cult but that the others were in such a rush to prepare for their departure that they forgot to give her the password. Jeremy tells her that the password is “open your heart,” and, satisfied, she slips back out of the compound and heads down to the docks, where she uses the password to get aboard the cruise liner -- the Skang. The first officer, Mr Gorridge, falls for her bluff and tells her that they’re setting off for Sri Lanka at 5:00 pm tomorrow. Sarah informs the Brigadier, who manages to get an injunction to prevent the ship from sailing until his investigation is complete. By now, they have learned that the Skangite inner council have come from all over the world, and for the first time, Sarah realises that there must be more than one Skang aboard the ship.
Sarah intends to slip aboard the ship herself to investigate while the Brigadier and Chatterjee go through official channels, but the ship sets sail at 2:00 am that night. When the Brigadier, the Doctor and Chatterjee arrive at the compound, they find that the cultists have already gone -- leaving behind an emaciated Alex Whitbread, who collapses in despair when he learns that the ship has already sailed. When the Brigadier mentions that they plan to catch up to the cultists in Sri Lanka, Alex reveals that they filed a false shipping report -- but refuses to reveal their real destination unless the Brigadier agrees to take him along. The Brigadier thus arranges to pursue the Skang in the HMS Hallaton, a Village Class Offshore Patrol Vessel. The ship is effectively commanded by its first lieutenant, Peter Andrews, as its skipper, Lt-Commander Gene Hogben, is usually drunk.
Alex remains silent until the ship is two days underway, and then gives the latitude and longitude for their destination, Stella Island. Bob Simkins, the ship’s navigator, is unable to locate the island on a map, but midshipman Chris Watts finds a passing reference in the Indian Ocean Pilot book. Convinced that this is a fool’s errand, Hogben orders Andrews to turn back. The Brigadier is unable to countermand his orders while they are at sea -- but he threatens Hogben with a court martial once they return to land, and Hogben gives in and orders Andrews to resume course to Stella Island. Sailing at 12 knots, it will take the Hallaton about a week to travel the 2,000 nautical miles to its destination.
Alex spots Sarah aboard the Hallaton, and realises that he must prevent her from reaching the island; otherwise, the Skangite inner circle will realise that he’s responsible for leading her to them. Once Sarah has become accustomed to the ship’s motion, she heads out onto the deck to take photographs, but Alex slips up behind her unnoticed, knocks her out and throws her overboard. The Doctor sees her in the water and leaps in after her -- but when Andrews tries to turn around for them, the sozzled Hogben takes offence at Andrews’ changing course without orders and orders him to resume his heading, leaving the Doctor and Sarah behind. The Brigadier once again threatens Hogben with court-martial and worse, but this time Hogben refuses to give in -- and the Brigadier thus punches him, knocking him out, and tells the rest of the crew that he’s fainted. The crew decide not to ask questions, and change course.
By this time, the currents have carried the Doctor and Sarah far away from their original location. The Doctor tries to keep Sarah’s spirits up by telling her stories from his childhood, but as night falls, it seems that they’re both doomed -- until the Doctor recalls his earlier experiments in the UNIT laboratory, and calls out to a pod of passing killer whales. The crew of the Hallaton are startled when the orcas swim past the ship, carrying the Doctor and Sarah with them -- and when the crew lower nets, the orcas toss the Doctor and Sarah into them and swim off.
Back on the ship with five days to go until Stella Island, the Doctor resumes work on the TARDIS’ temporal governor, and tests it by placing the Brigadier and Sarah in small time loops. Sarah keeps up with her exercise by doing laps around the deck; however, due to the ship’s layout, she is forced to pass through a small door near the captain’s cabin each time. She does so quietly at first, so as not to wake him, but as she becomes accustomed to her routine she becomes more careless about closing the door quietly. Meanwhile, Alex has been watching her routine, waiting for another chance to strike, and he realises that he can loosen the starboard searchlight and drop it on her head when he hears her emerge from the cabins. However, the day he chooses to act, Sarah inadvertently lets the door slam behind her on one lap, waking Hogben from his drunken stupor. On her next lap, Hogben follows her out of the cabin to shout at her for disturbing him, and when he lets the door slam shut behind him, Alex inadvertently drops the searchlight on him instead of on Sarah.
Hogben is buried at sea, and Andrews become the Hallaton’s acting CO. It’s clear that Hogben’s death was no accident, but when Andrews calls back to London to report the incident, he is told to hold his course and obey the Brigadier’s orders. The Brigadier and the Doctor explain the true nature of their mission to the incredulous Andrews, and in the process, the Doctor reveals the true extent of the threat, which Sarah and the Brigadier hadn’t fully appreciated. If the Skang had simply come to this planet to feed, they would have found many more bodies, and there would be no need for them to drag their disciples halfway across the world. The Doctor thus deduces that the Skang that are already on Earth are merely a spearhead for a mass invasion, and if they aren’t stopped, the entire human race will be overrun.
The Hallaton arrives at its destination, a rocky island surrounded by mist. There is no sign of the Skang, but despite the Doctor’s reservations, the Brigadier decides to storm the island in force. Before the landing party can set off, however, the mist drifts out over the ship, and the crew find themselves relaxing, as the scent reminds them of pleasant childhood memories. The mist clear to reveal an island paradise with golden sand and tropical trees, and the Skangites standing on the beach, waving to the newcomers in welcome. The crew decide to accept the invitation, concluding that it’s silly to storm the peaceful cultists with all guns blazing. Only the Doctor realises that something odd is happening, but he decides simply to observe for the time being.
Mother Hilda welcomes the newcomers to Skang Island and offers them a banquet of delicious tropical fruits and vegetables; however, the Doctor stops Sarah from drinking the fruit juice, reminding her that the “offering” in London had been spiked with hallucinogens. Sarah is delighted to be reunited with Jeremy -- much to her surprise, as she can’t stand him -- and as they chat, he reveals that the Skang has been scuttled, since they won’t be needing it any longer. Mother Hilda shows her visitors to the opulent Skangite temple in the caldera of the island’s extinct volcano, and the Brigadier and Andrews conclude that this has all been a foolish waste of time and agree to leave the Skangites in peace. As they return to the Hallaton, planning to set sail at high tide the next day, Sarah finally realises that they are all under the influence of the hallucinogen, which was dispersed within the mist and boosted by the fruit juice offered to the crew on the beach.
Alex contacts Hilda, claiming to be truly repentant and insisting that someone else must have tipped off UNIT about the location of the Skang temple. Hilda is willing to believe that Alex is genuinely contrite, and agrees to let the council decide on whether to accept him back; however, Brother Will is not convinced and vows that Alex will only be welcomed back into the fold over his dead body. Alex thus sets about arranging this through his ally, the weak-willed Brother Dafydd. Dafydd has always agreed with Alex that Hilda’s way is too slow and uncertain, and although he is unwilling to commit murder for Alex’s sake, Dafydd agrees to lure Brother Will to a certain spot on the clifftop, where Alex will deal with him.
The crew of the Hallaton, still flying high on the Skang hallucinogen, party late into the night before falling asleep. The Doctor and Sarah then slip ashore intending to find proof that the cult’s inner council members have been tricked into bringing their disciples here for the Skang to feast upon. Sarah’s high-quality camera went over the side of the with her during Alex’s first attempt on her life, and she thus takes a Polaroid camera to the island with her. Oddly, Sarah finds it difficult to traverse the jungle even though it appears to be an easy walk. When they arrive at the compound and Sarah takes a photograph of it, the Polaroid develops to reveal that the compound is not a resort paradise on a golden, sandy beach, but in fact consists of squalid mud huts sloppily constructed on a foul, rocky shore. The hallucination induced by the mist finally wears off, and Sarah sees Stella Island for the scrubby, rocky wasteland that it really is.
Brother Dafydd contacts Brother Will and claims to have seen the crew of the Hallaton preparing to storm the cliffs. Though sceptical, Will sends out men to investigate and goes to the cliff face to see for himself -- and once he arrives, Alex emerges from hiding and pushes him over the edge. Sarah and the Doctor see Will fall to his death, but when they investigate, they find the body of a Skang at the base of the cliff. They are forced to hide when two acolytes arrive, and when one of the acolytes tries to call Brother Will to report what they’ve found, he hears his own voice coming from a walkie-talkie in the pocket of the dead Skang’s robes. The acolytes carry the body back to the temple, wondering aloud whether this will ruin their reward ceremony, and Sarah realises that the ceremony -- at which the Skang’s followers will be devoured -- is due to take place today. Worse, the Doctor now understands that the inner circle are really Skang who are projecting the outward appearance of the humans they once were, which explains Alex’s desperation to rejoin the group and his refusal to let Sarah take his photo in London. The Doctor sends Sarah back to the Hallaton with her photos, while he remains and tries to stop the reward ceremony.
Alex assures the guilt-wracked Dafydd that he’s done the right thing, while privately planning to dispose of Dafydd once he is in power. The inner circle then meets to discuss Alex’s reinstatement and the unfortunate death of Brother Will, whom Dafydd claims slipped and fell while looking for intruders. The others accept his claim, and without Will’s dissenting voice to sway them, they vote to accept Alex back into the fold. The Doctor arrives in time to witness the reinstatement ceremony; the Skang chant in a transcendent harmony that enfolds Alex back into the inner circle, revitalising him. To Hilda’s surprise, the reinvigorated Alex is the first to lift his hands to Brother Will’s body and initiate the process of Incandescence; just as the Skang chanted Alex back into the fold, now their disharmony burns away the dead Skang’s body in a blaze of light.
The crew of the Hallaton wake miserable and hung over, and although they notice that the Doctor and Sarah have gone, they prepare to set sail anyway. Meanwhile, Sarah returns to the beach only to find that the acolytes sent out by Brother Will to look for intruders have found their lifeboat and are standing guard over it. She is thus forced to strap her camera to her head and swim out to the Hallaton; fortunately, the reefs are close to the surface and it is relatively easy for her to get out to the ship before it sets sail. Even with her photographs, however, the crew find it difficult to accept that they’ve been tricked -- until the Hallaton swings around within sight of the rocky beach and they can all see the truth for themselves. The Brigadier, ashamed, apologises to Sarah for his disbelief. The Hallaton will leave the lagoon in order to lull the Skang into a false sense of security, but will then moor at a different beach on the island so the crew can launch an attack on the Skang.
As the Skang leave to prepare their flock for the coming ceremony, the Doctor contacts Mother Hilda, hoping to get through to whatever part of the original Hilda Hutchens remains within her. Hilda explains to him that the Great Skang, a gestalt life form, is hidden behind Earth’s moon. When it first arrived, it released spores into the Earth’s atmosphere; various human beings inhaled those spores and were gradually transformed into Skang while retaining their human memories and personalities. Mother Hilda is a Skang, but she is still Hilda Hutchens; she has not been possessed, but transformed. As a Skang, she insists that the survival of her species is a biological imperative, and that the ceremony must take place today. The Skang travel by riding gravity waves, Stella Island is located on the equator, and today is the equinox; thus, this is the ideal time and place to summon the Great Skang by the “assimilation” of the cult’s followers. Hilda, understanding that the Doctor’s great wisdom would be of benefit to her race, plans to keep the Doctor under guard until the ceremony is complete and then transform him into a Skang. However, while she has been speaking with the Doctor, Brother Alex has been using charm, flirtation and blackmail to win the rest of the council over to his side -- and he now makes his move, ousting Hilda from power and ordering the guards to keep her confined with the Doctor. Hilda, distressed, tells the Doctor that the Great Skang has placed her in charge for a reason; if it arrives on Earth to find that its chosen leader has been deposed, it will decide to abandon the Earth -- after destroying all life on the island so as to leave no trace of its presence on the planet.
The sailors aboard the Hallaton see the disciples leaving the beach and filing up towards the temple, and realise that they’ve left it too late to attack. The Brigadier has no choice but to order the sailors to fire the ship’s missiles at the temple, though he knows that the Doctor will be killed as well. Up in the temple, Alex is addressing his fellow Skang, telling them that they can now move forward without fear under a dynamic leader -- but as he speaks, the bombardment begins. The Doctor and Hilda are buried alive in their cave when part of the temple collapses over its entrance; however, the remaining Skang strip off their robes and take to the skies, riding waves of gravity in bodies less dense than those of human beings. Outside, the disciples flee in terror when the bombardment begins, and some are trampled and crushed in the stampede -- but instead of helping his fellow disciples, Jeremy stays where he is so that he’ll be first in line for the reward when the queue reforms.
The Skang fly over the Hallaton, exhaling the hallucinatory mist. Sarah manages to get to cover, but the other crew members fall under the mist’s influence and forget what they were doing. After firing the last of their missiles blindly into the air just for fun, the crew notice a resort town on the distant beach and set course directly for it. Sarah emerges from her cabin to see that the crew are heading straight for the cliffs, and to everyone’s astonishment, she pulls the engine-room telegraph to full astern and takes the wheel herself. Andrews pulls Sarah away from the wheel, but Bob Simkins arrives from the engine room, where he had been protected from the mist’s effects, and sees what’s happening. He pulls the wheel hard to starboard, and although Andrews tries to intervene, the effect of the mist wears off just in time, and the Hallaton narrowly misses colliding with the cliffs.
Alex orders his followers to bring in the faithful, but just as Jeremy is preparing to enter the temple, a woman named Emma starts chatting him up -- and steps ahead of him in line before he realises what’s happening. The Doctor and Hilda, unable to clear a way out of the cave, watch helplessly as Alex sticks his proboscis into Emma’s body, liquefying and consuming her internal organs; however, he releases a calming enzyme into her body as he does so, and she appears to enjoy the process of her death. Emma’s death, the Prime Assimilation, summons the Great Skang to Earth, and it manifests itself as a cluster of glowing lights in the centre of the temple. However, when it sees that its appointed Mother is not present, it turns on Alex and demands to know what has happened to her. Alex foolishly insists on his right to lead the Skang, and with a gesture, the Great Skang burns him to ashes. However, its presence has revitalised Hilda, and before the Great Skang can dispose of all life on the island, she pushes aside the heavy boulders blocking the cave entrance and emerges to welcome the Great Skang to Earth.
As the Skang prepare to devour their disciples and spread out across the Earth, the Doctor instinctively leaps forward, protesting and pointing out the flaw in the Great Skang’s plan; human beings are individuals, and just as Alex retained his human greed and arrogance when transformed into a Skang, so the Skang unity will become divided if they assimilate the human race. The Great Skang accepts the Doctor’s arguments -- and claims that it will therefore put biological safeguards in place to protect itself before devouring humanity. Before it can kill the Doctor, however, Hilda points out that the Doctor’s superior intellect and knowledge could only benefit the Skang race, and gives the Doctor a choice: either accept his transformation into a Skang, or die here and now. The Doctor’s thoughts go in circles trying to find a way out of the situation, but this in itself gives him an idea. He thus accepts the Great Skang’s offer, and stands by as the Skang’s disciples, including Jeremy, are ushered into the temple.
Shaken by their narrow escape, the Brigadier and the crew of the Hallaton storm the temple, wearing gas masks to protect themselves from the hallucinogenic mist. As they prepare to attack, however, Sarah sees the Doctor fiddling with the TARDIS’ temporal governor -- and just as the Skang are about to devour their followers, the Great Skang vanishes, each individual light within its body going out as the members of the inner circle, including Hilda, collapse into dust, empty shells with no animating psychic influence. The Doctor explains to his friends that he used the temporal governor to place each individual element of the gestalt Skang swarm into a separate time loop, just as he had done to the Brigadier and Sarah earlier as a test; he is saddened by the inner circle’s deaths, but feels that this was as merciful as he could afford to be. The sailors try to explain the situation to the shaken Skangite disciples and prepare to take them back home, but to Sarah’s astonishment, Jeremy’s reaction upon learning the truth is to complain that he didn’t get the reward he was promised.