As Picard prepares to leave to arbitrate a miners' dispute on Pentarus Five, he informs Wes that he's just gotten into the Academy-and he'd like Wes to accompany him to the mediation as a final mission. An emergency call comes in to the ship from Songi, head of Gamilon Five-a ship has entered orbit, hasn't answered hails, and has increased radiation levels planetwide. The Enterprise warps off to help them, as Picard and Wes leave with Captain Dirgo in his mining shuttle.

However, before they reach the planet, one of the shuttle thrusters blows off, and the ship careens out of control. With no other workable options, they crash-land on a moon of Pentarus Three which can support life (just). The three of them are all right, but the communications system is destroyed, along with the replicator-and Dirgo has no emergency food or water.

The Enterprise arrives at Gamilon and discovers the ship is an abandoned garbage scow carrying radioactive waste-they promise to tow it out. Riker decides to send it into Gamilon's sun, but takes Geordi's advice to use remote construction modules rather than a tractor beam (so as to minimize radiation dosages on board the Enterprise). When they receive word from Pentarus Five that the shuttle hasn't arrived yet, they get working on the scow as fast as possible.

Meanwhile, Picard, Wes, and Dirgo head for the mountains, despite signs from Wes's tricorder of strange energy readings, possibly life, and eventually find a cave. The Enterprise crew quickly find the construction modules don't work, as one of them blows itself off the ship, causing a further leak. To avoid danger to the planet, Riker orders shields extended around the scow and the tractor beam set, and they begin towing. Wes and the others, in the meantime, find a fountain of water-but are repelled from getting to it by a force-field. Dirgo tries to shoot through it, but a mysterious energy-shape knocks away his phaser and causes a rockslide. Picard manages to push Wes clear of the slide, but is caught in it himself.

He's hurt badly, but despite Dirgo's insistence that Picard will never survive, Wes tries to keep him alive. As the Enterprise tries to find a way to speed up and still keep the tractor beam stable (so as to avoid fatalities), Wes starts studying the sentry's energy readings. He only gets as far as telling Dirgo that it must be sensitive to something in the phaser before Dirgo railroads him into setting off two phasers at once, so that one of them can cut through the field. The plan fails, and Dirgo is killed.

While Wes tells Picard about Dirgo and talks with him about the good fortune he's had to serve with Picard, the Enterprise manages to get the scow clear of the asteroid belt (the reason they couldn't just push the ship towards the sun) just in time, and leaves to join the search for the shuttle. Wes tells Picard that everything he's done, he's done to make Picard proud of him, and resolves to find a way to keep Picard alive until help comes no matter what.

As the Enterprise finds the debris of the destroyed thruster and heads for the moon as the best option, Wes manages to stop the sentry and get the water, which he then gives to Picard. Some time later, the Enterprise arrives and rescues the two. As Picard is taken from the cave, he tells Wesley he will be missed.