Year 2900. Earth's surface has been roasted by solar flares, but humanity lives on. The United Kingdom in particular is now moving through space as a nation-vessel, with the London skyline resting above the hull of a massive star ship.
The doctor and his companion, Amy Pond, arrive on board to find a girl of twelve crying alone. She runs off. Disturbed, the doctor switches from observer to investigator. They find that centuries of hardship in space are now written on the faces of citizens and visible in the equipment of the ship. Most of the technology was in some state of disrepair, except for the immaculate surveillance machines used to monitor every human being.
The doctor, detecting a police state, sends Amy to learn what she can from the young girl. Amy pursues the truth of the last 300 years, and the doctor looks for the answer to why the star ship he just boarded is flying through space with no engine and no source of power.
Amy chances upon a booth with two buttons and several screens. One button says, "Forget". The other says, "Protest". She plays the video, and learns of the star ship's true nature, and the deeds humanity has done to survive. The booth explains that the choice given every citizen of 16 and over is to either vote to forget their past, or protest the measures taken to save humanity.
A one percent vote to protest would mean the discontinuation of the star ship program. She immediately presses the Forget button, just as the doctor walks in. The machine, recognizing the doctor as a Time Lord and not a human being, refuses to play the human history video for him. The doctor then slams the Protest button to investigate what is done to those who do do not forget.
Amy and the doctor plunge into the mouth of a beast living beneath the city, as dissenters become food for the beast below. After a narrow escape, they meet none other than the Queen of England, Liz 10 (Elizabeth the 10th), roaming the ship undercover, investigating exactly the same things: why does the starship fly with no power, and what dark deeds lie in the past, that none are allowed to remember? They ascend the tower of London together, taken there by the security forces of the ship, half-human robots that police the remains of humanity. She discovers that her predecessor ordered that every time a sitting monarch investigates the past, they must be taken here, to make the same choice every citizen makes, but in her case it is this: Forget the Past, or Abdicate as Queen.
Exiting the central room is a band of children. The doctor, Amy, and the Queen learn that the beast below refuses to eat children. They also find that the beast's brain is exposed, controlled by an electric mechanism above.
The Queen begins to realize with the doctor's help what is powering the ship, and who ordered the program into existence. A video of Liz 10 appears, explaining that the beast is a Star Whale, a near-extinct being, once numbering in the millions.
The Star Whales of the past guided many space travelers, coming to the aid of their vessels. In humanity's case, as their children cried out from the burning heat of the solar flares, the star whale came like a miracle. Humanity then captured the whale and built a survival Ark around it. To their knowledge, their star whale was the last of its kind, and their only hope of searching the universe for a new home.
Liz 10's realization was now complete. She was the same Queen that 300 years ago ordered the enslavement and torture of the last space whale. Her subjects -by her Orders-extended her life so that she could be the ever-young beacon of hope, and so that she could perpetually discover and forget the truth, allowing humanity to continue surviving by the subjugation of one.
And now the doctor's impossible choice had come. Would he save this innocent creature or save the human race? He created a third option- to blunt the brain's higher functions and leave the beast as a vegetable that could be controlled by electrical impulse, saving humanity and mercy killing the star whale.
This would have been the end of the episode, and perhaps the end of the doctor- whose very ethos is much like the best doctors of humanity - to do no harm, to tend life and to be kind.
But Amy saw something out of the corner of her eye- the beast's tendril had reached out to a young child, and was affectionately grazing her shoulder, even as its own torture continued.
Amy grabbed the Queen's hand and with it slammed the Abdicate button. Now free, the star whale could have disintegrated the star ship and destroyed every soul aboard. But the star ship was intact, and its speed accelerated.
No longer hampered by the torture device, the last star whale was now more free to carry the human vessel through space. Amy had realized that it wasn't a miracle that brought the star whale to earth- it was a choice. The star whale volunteered to be their vessel. Just as the doctor could not look away from the sight of a crying child, the star whale could not bear to hear the cries of earth's children.
What would one do, Amy asked, if one were very old, and very kind, and they found someone in need? Having seen the kindness of the doctor - the final and only Time Lord left- a being unable to look away from those in need, Amy chose to trust that- after all the loneliness of time and space, the torture and abuse- what would also remain within the star whale was kindness.