On the planet Peladon a power struggle is in place between the trisilicate miners and the ruling class, with miners under the leadership of Gebek and hot-headed Ettis calling for improved conditions. The planet’s ruler Queen Thalira, daughter of the late King Peladon, is sympathetic, but knows her planet is vital to supply the war effort of the Galactic Federation of which it is a member. The Federation is in conflict with the warlike Galaxy Five confederation. The Pels become concerned when a vision of Aggedor, the royal beast, starts appearing in the mines and killing miners, including the alien engineer Vega Nexos. Chancellor Ortron tries to convince the Queen this is a sign of displeasure at the alien presence on the planet, but she remains unconvinced.
Another alien presence reaches the Citadel: the TARDIS, bearing the Doctor and Sarah Jane Smith. He recalls his visit to Peladon fifty years earlier when the planet joined the Galactic Federation, and is pleased to find a familiar face in Alpha Centauri, the Federation Ambassador. The Queen knows of the Doctor from her father and enlists his support in trying to find the cause of the manifestations of Aggedor. He guesses someone is deliberately trying to interrupt trisilicate production, and they seem to have succeeded when the miners decide to strike. Ettis then leads an attack on the Federation armoury and gets weapons for the striking miners. This looks like damaging trisilicate supplies even further, so Engineer Eckersley, a human in charge of the refinery, sends for Federation troops to help restore order.
Both the miners and the Pel leaders are unhappy with the notion of Federation occupation, especially when the Ice Warrior force displays its ruthlessness in shooting down Pels. The sole concern of the force leader, Commander Azaxyr, is to maintain trisilicate production. There is now a realignment in Pel politics: Ortron and Gebek join forces in seeking to rid the planet of the Martians. Ettis, however, has become crazed and is killed trying to blow up the Citadel. The Ice Warriors now impose martial law on the capital, imprisoning the Queen and her courtiers, and even killing Ortron when he tries to flee.
The truth is now revealed: Azaxyr and Eckersley are both Galaxy Five agents and have engineered the crisis and occupation as a means to control the trisilicate supply. The Aggedor apparition was just an image created to support the panic. Gebek now leads the Pels in a final assault on the Ice Warriors, and Azaxyr and the other invaders are killed. Eckersley himself is killed by the real Aggedor when he attacks the Queen, though sadly the beast dies in the process. News now reaches Peladon that Galaxy Five has capitulated, its Peladon strategem exhausted, and Queen Thalira seeks to repair Pel society when she appoints Gebek her new Chancellor. As ever, the Doctor and Sarah slip away quietly.