The Enterprise is conducting planetary surveys with Commander Ari bn Bem, an observer from Pandro, a neutral world with which Starfleet and the Federation hope to establish diplomat relations; Pandro's advanced medical technologies could be of enormous benefit to every Federation planet. Unfortunately, Commander Bem has done precious little "observing? during his six months aboard the Enterprise, preferring instead to remain alone in his quarters. It isn't until the starship enters orbit of the planet Delta Theta III that Commander Bem finally asks to join one of the planetary exploration teams. Kirk resists the idea at first, not wishing to put an important guest in jeopardy on what could be a dangerous, unexplored planet. Despite Bem's annoying tendency to "take over? Kirk's landing party, the captain relents and lets the Pandronian beam down with him, Commander Spock, Chief Engineer Scott, and Lieutenant Sulu, and even allows Bem to work the transporter controls.

Kirk immediately regrets this last decision, because the landing party materializes in waist-deep water. Unknown to everyone but Bem, Pandronians are "colony creatures,? beings capable of separating their bodies into separate, independently functioning parts; while the landing party is partially submerged, Bem surreptitiously uses this ability to steal Kirk and Spock's phasers and communicators, leaving fakes in their place.

Meanwhile, the Enterprise's sensors detect a strange energy pattern nearby, which may or may not be simply a weather-related phenomenon. After the team leaves the water and begins surveying the local rain forest, Commander Bem abruptly runs off to approach a group of native life forms, against Kirk's orders. Kirk and Spock pursue Bem, and discover that he has been captured by a primitive tribal group of sentient reptile folk. Meanwhile, the strange energy effect picked up by the Enterprise's sensors expands, and Scott and Sulu are disconcerted to discover that they cannot reach either Kirk or Spock via communicator, and therefore return to the Enterprise to search for their missing teammates from orbit.

Deep in the rain forest, Kirk and Spock catch up to Commander Bem, and they discover not only that their equipment won't function, but also that the Pandronian does not wish to be rescued from the crude cage in which the natives have confined him; he explains that he wishes to stay and observe. The natives quickly find and capture Kirk and Spock, herding them into cages as well. Commander Bem admits to having tampered with Kirk and Spock's equipment, but claims to have done so only to prevent them from doing unnecessary violence to the natives he wishes to observe. Bem then astonishes his teammates by splitting his body into several parts, which easily slip out of the cage, then returns the phasers and communicators to Kirk and Spock before re-entering his own cage. The Pandronian hopes that he has convinced Kirk of his usefulness. Meanwhile, the energy pattern detected from orbit has expanded to cover the entire planet, cutting the remainder of the landing party off from the ship.

After making their escape from the cages, Kirk, Spock, and Bem are paralyzed by a mysterious stasis field, and a disembodied female voice speaks to them. They discover that they're being detained by an energy being — the source of the odd energy readings — that looks after the reptile folk. The entity warns them against trying to harm her "children.? When Kirk explains that it is his job to explore and classify worlds such as this one, the energy entity orders him and his people to leave. Accusing Kirk of mishandling this alien contact situation, Bem runs away once again, forcing Kirk and Spock to stay on the planet until he is found. The team's failure to leave immediately angers the energy being, to whom Kirk explains that he cannot leave before recovering the team's missing member.

Kirk and a security team soon find Bem, who again has become a captive of the reptile people. Furious to discover that the intruders are still on her world, the energy creature confronts Kirk, who explains that he is responsible for the safety of his own people, just as the entity is responsible for the welfare of her "children.? Placated, the being lets the team return to the Enterprise. Commander Bem decides that his observation mission has been a failure, and that he must atone by permanently splitting his body into its component parts. The alien entity tells him that he cannot learn from his errors if he does this, and Bem takes her words of encouragement to heart as the team returns to the Enterprise.