En route to investigate a mysterious planet, the U.S.S. Enterprise passes through a wormhole in space which knocks everyone but Data unconscious. As the crew begins to revive, Data tells Picard that they were out for 30 seconds, and when Riker remarks that the ship's instruments indicate an entire day's travel, Picard blames the discrepancy on the wormhole. Data talks Riker and Picard out of going back to investigate the planet, sending a probe instead. When the probe reaches the planet, its reading conflicts with the crew's original assessment. Data blames this on the wormhole as well. However, when a botany experiment Beverly is conducting exhibits a full day's growth, she brings her findings to Picard's attention, forcing him to consider the fact that Data may be lying.
Confronted with Dr. Crusher's experiment, Data offers a flimsy explanation and is dismissed by Picard, who then orders a covert investigation. Geordi soon discovers that the ship's chronometer, which only he and Data have the power to reset, has been tampered with. Unable to ignore the fact that something is causing Data to lie, Picard orders the android to undergo an examination.
Geordi examines Data and tells the captain he found nothing unusual. Picard then dispatches Geordi to investigate the probe Data sent out. Soon afterward, a dizzy Troi is frightened when her reflection indicates some creature is inhabiting her body. She dismisses the incident as a hallucination just as Geordi returns with the news that the probe Data sent out was rigged to disguise the abnormal planet the starship originally encountered. Picard confronts Data, who reveals that his actions are not his choice.
Later, Beverly informs Picard that Worf sustained a broken wrist that has been reset and treated — all during the period the crew was supposedly unconscious. Picard replies that he believes Data is lying to protect the crew. He orders the crew to retrace their steps toward the mysterious planet in order to find out what really happened and clear Data's name. Data begs Picard to turn back but refuses to explain why. The captain instead demands to know who ordered Data to lie, and is shocked by Data's revelation that he himself gave the order.
Believing Data, Picard then orders the crew to follow the android's instructions. Data explains that the U.S.S. Enterprise has invaded the space of extreme isolationists who stun intruders, take over their ship and send it out of their space. Since Data was unaffected by the stun and would know of their existence, the aliens insisted the U.S.S. Enterprise be destroyed. As a compromise, Picard agreed to have the entire crew's short-term memory erased and ordered Data to hide what happened, but Beverly's plants and Worf's wrist gave the trick away. Luckily, Picard is able to talk the aliens into giving them another chance, and orders the crew to make sure not to leave any clues.