The Enterprise, responding to a distress call on a Federation colony on Delta Rana IV, discovers the planet to be completely devastated and devoid of life, save for one small square patch of land containing a single house and surrounding vegetation. Transporting to the surface, the away team discovers the human occupants of the house, Kevin and Rishon Uxbridge, are unaware they are the only survivors of the colony. Though Kevin would rather have the Enterprise leave them in peace, Rishon allows the team to stay and check the house for any reason why they might have been spared. The team, finding nothing of interest save for a small music box, insists the Uxbridges return to the Enterprise for safety, but they refuse. Aboard the Enterprise, Deanna Troi begins hearing the music from the music box in her mind over and over which slowly drives her insane.
An unknown spacecraft appears in orbit and starts to attack the Enterprise, then turns and leaves orbit at high speeds. The Enterprise gives chase, but eventually Captain Picard orders the ship to return to the planet. Picard joins a second away team to visit the Uxbridges, trying to learn more about the situation over tea; Kevin believes they were spared as they were pacifists. Again, the Uxbridges refuse to be transported to the Enterprise for safety. Upon the away team's return, the spaceship appears in orbit again, but Picard orders the Enterprise to leave the system first, believing that the crew is being toyed with. When they return to the planet, the ship is nowhere in sight, and Picard again transports to the surface to insist on the Uxbridges to leave with him as well as to help Troi's dementia. After being refused again, Picard tells them the Enterprise will continue to protect them indefinitely, and returns to the ship. The spaceship shortly appears again and attacks and destroys the Uxbridges' home; Picard orders an attack on the craft, which falls easily under the Enterprise's firepower. Playing on a suspicion, Picard has the Enterprise move to a higher orbit for a short while and continue scans of the planet; after a short time, the Uxbridges' home reappears.
Picard orders the Uxbridges beamed up to the Enterprise. Kevin admits that what they have seen has been a ruse; he himself is a Douwd, an immortal energy being with vast powers who, while traveling in human form, met Rishon, fell in love with her, and settled with her on Rana. When the Husnock, an aggressive, destructive species, attacked the planet, he refused to join in the fight (in accordance with his species' strict pacifism), but Rishon did, and she died with the rest of the colonists. Stricken by grief and giving in to his rage, Kevin used his powers to destroy not just the one Husnock vessel and its crew, but "all Husnock, everywhere" - annihilating the entire species, over 50 billion. Horrified by his crime, he chose self-exile to the planet, creating the replicas of Rishon and their house with which to spend the rest of eternity, and using a recreation of the Husnock ship as intimidation to keep their privacy. Picard is unable to come to judge Kevin's actions and decides the best course of action is to allow the Douwd to continue his exile. After Kevin cures Troi's mental collapse - which was his method of preventing her from telepathically identifying him - the Enterprise leaves him and his illusion in peace.