The search for the fifth segment of the Key to Time brings the Doctor and Romana to the swampy terrain of the third moon of the planet Delta Magna. Almost immediately, they become separated. The Doctor (Tom Baker) draws fire when he is mistaken for Rohm-Dutt (Glyn Owen), a notorious gunrunner wanted for supplying firearms to the Swampies, an aboriginal people who were displaced to the marshy moon when human colonists took possession of Delta Magna. A small team from Delta Magna are now developing a refinery in the Swampies' promised territory, but the Swampies are confident that, properly armed, they can drive the humans away. Meanwhile, Romana (Mary Tamm) has been captured by the Swampies and prepared as a sacrificial offering to their god, the mighty Kroll. Thwarting the sacrifice (in which the god was nothing more than a Swampie priest in fancy dress), the Doctor and Romana have incurred the wrath of Ranquin (John Abineri), a fanatical high priest to Kroll. Legendary or not, something is stirring beneath the swamp floor and, if the refinery's instrument readings are correct, it measures five miles across!