Wesley Crusher has been accepted in Starfleet Academy. Captain Picard offers Wesley one last mission, a diplomatic visit to Pentarus V, before his scheduled departure for Earth. As the two are about to board a mining shuttle piloted by Captain Dirgo to take them to Pentarus V, the Enterprise receives a distress message from nearby Gamilon V, where an unidentified vessel has entered orbit and giving off lethal doses of radiation to the planet's surface. Picard orders Riker to command the Enterprise to resolve that situation before setting off with Wesley and Dirgo.
En route, one of the thrusters on Dirgo's ship is blown off and they are forced to crash on the surface of a harsh, desert-like moon nearby. Though they are unharmed, the shuttle is beyond repair, and its communication systems and food replicators are broken, and Picard berates Dirgo for failing to have any emergency supplies on board. Using tricorders, Wesley identifies some caves and a potential source of water some distance away, and the three trek there. In a cave they find a fountain-like water source, but when they move in to get some, a crystalline-like force field appears. Dirgo attempts to use a phaser to destroy the field, but this only serves to cause an energy bolt to emanate from the fountain and cause a rockslide; Picard pushes Wesley out of the way but is struck on the head, knocking him out.
Meanwhile, the Enterprise has arrived at Gamilon V, finding the unidentified ship is an abandoned garbage scow filled with radioactive waste; the radiation itself interferes with several of the Enterprise's systems including its tractor beam systems. Riker orders the crew to attach boosters to the ship to fly it into Gamilon's sun, despite the interference from the radiation. During this, they learn that Picard did not arrive at Pentarus V nor has reported in, and Riker hastens efforts to move the scow. Eventually, the scow is successfully pushed into the sun, and the Enterprise returns to help in searching for Picard and Wesley.
Picard has become weak from his injury, and Wesley asserts the need for water to be paramount. Wesley studies the fountain, noting that it is sensitive to the energy given off by phasers, but Dirgo bullies Wesley into more direct action, having them fire on the force field simultaneously with two phasers. Instead, when they do this, the energy field envelops Dirgo and creates a crystalline shell around him, killing him. Wesley continues to study the fountain with Picard's time short. Wesley determines that he can counteract the energy field from the fountain using a tricorder if he can act quickly enough, and successfully brings down the field, grabbing water to give to Picard and himself.
Shortly thereafter, the Enterprise has located the wreckage of the mining shuttle, and soon Picard and Wesley are rescued. Picard, as he is carried from the cave, tells Wesley that he will be missed.