The TARDIS takes the Fourth Doctor and Sarah back in Time to witness stages of the Earth’s development. However, as the planet evolves from a mass of heat and gas, Megron the High Lord of Chaos has his own designs on our homeworld. If his threats to endanger the stability of Earth have any substance, the existence of mankind itself is in question!
The Doctor notices a fault with the TARDIS controls. After mumbling some technobabble (“No response… jelly baby… reciprocator cancel…”), he simplifies things for Sarah: the steering’s gone out. A force has gripped the TARDIS and thrown it back forty-five hundred million years into Earth’s past. Once they arrive, they get into a two-person space capsule and explore the nascent Earth, which is currently an oxygen-less ball of gas. The Doctor points out that at the centre of all that gas is a molten core which will form the planet Sarah knows as Earth.
The two return to the orbiting TARDIS and are controlled again by the mysterious force. This time it drags them millions of years in the future. They return to the capsule to view what has become of the Earth since they last looked upon it. Now, the planet is much smaller, closer to the size Sarah knows. It is considerably more solid, The Doctor notes – its crust rapidly forming. While they are examining the planet’s geologic fury, they hear a disembodied voice. It’s Lord Megron, “High Lord of Chaos, Chief of the Carions and Lords of Chaos”, claiming he has taken control of Earth. The Megron have been attracted to Earth at this point in its history because they believe the planet’s geologic formation is an expression of chaos and disharmony. When The Doctor points out that it’s actually a sign of progress and coming order, the Megron disappears, blowing the duo back into the TARDIS and further down the time vortex.
The Doctor and Sarah are thrown yet more millions of years forward. Sarah now can’t help but notice the many volcanoes dotting the surface of the planet. She is profoundly disturbed by the violence they seem to be meting out on the surface of the Earth, but The Doctor finds it beautiful. He lets her look through a device that shows the history of the planet passing before her eyes, to show her the cause and effect of volcanic activity and plate tectonics. She’s physically sickened by it all, but The Doctor continues to enthuse about the creative spectacle. Finally, when she sees a mountain range form before her eyes, Sarah begins to get excited by the process as well. The Doctor points out that this is the beginning of true order on the planet. The Megron returns, but he’s still not buying The Doctor’s claims that the planet is emerging from chaos. The Doctor counters that the planet is no longer exclusively using space gases: a little oxygen is sustained on the planet itself. The Megron still tries to deny things.
Back in the TARDIS, the duo have moved on to a point when the Earth has an atmosphere and life. Oxygen is in abundance on the Earth. Yet the Megron is still there. The Doctor challenges him to a telepathic duel. The Megron loses and The Doctor banishes him from Earth. The Doctor and Sarah say “Bye bye” to the Megron, as well as to chaos itself.