The Enterprise, after dropping off a colony in the Strnad Solar System, visits the idyllic world Rubicam Three, home to the Edo. It's a simple world, and an away team beams down to examine its suitability for shore leave.

Meanwhile, Data examines an odd sensor "glitch", which seems to indicate a presence off the starboard bow. Upon further analysis, they find it's not a glitch. As the being materializes, they find it is both there and not there; it's only partly in this dimension. It sends over a probe, which stuns Data and analyzes his knowledge.

The away team discovers the one flaw in this paradise of a world: its justice system. While its rules are simple, and only one punishment zone exists at any given time, anyone who breaks the law in such a zone is immediately executed, no matter what the crime. The team searches for Wesley, who ran off with some of the younger Edo, and they find him just seconds too late, as he falls into a greenhouse and kills some new plants. Picard is put in the difficult position of either breaking the Prime Directive or allowing Wesley to die.

To make matters worse, the entity in space with the Enterprise is revealed to be a collective intelligence that may have planted the Edo there in the first place, and is worshiped by them as a God. It has nearly unlimited power, and does not want the Edo's laws interfered with.

Eventually, Picard manages to convince the Edo god that "there can be no justice so long as laws are absolute," and is allowed to take Wesley back. They consent to remove the nearby colony, and depart.