While playing poker with Riker, Data and Worf, a strange feeling of déjà vu helps Dr. Crusher successfully call Riker's bluff. She is then summoned to sickbay to examine a dizzy Geordi, and once again experiences this sensation. When she goes to bed that evening, she is haunted by strange voices in her quarters. The ship continues to chart the Typhon Expanse, a previously unexplored region of space, until the distortion field suddenly fluctuates, the main propulsion systems collapse, and the Enterprise is thrown into red alert on a collision course with an older starship. Riker recommends decompressing the main shuttlebay, but Picard follows Data's advice and uses the tractor beam to alter the other ship's trajectory. Unfortunately, this course fails, the ships collide and the Enterprise explodes and is completely destroyed.
Later, Riker, Data, Worf and Beverly are playing cards again, and both Riker and Beverly realize they know what is coming next. Beverly is again summoned to Sickbay, where she and Geordi both experience feelings of déjà vu. When she hears the voices in her room, she immediately goes to Picard and tells him that something strange is going on. He decides to run a diagnostic. The next morning, while discussing the results of that diagnostic, the older ship mysteriously appears and the Enterprise is again destroyed.
The card game is in full swing again, but this time, all four players realize they know what cards are coming next. Beverly anticipates being called to Sickbay, and when Geordi again shows up feeling dizzy, she goes to Picard and repeats their previous exchange. She hears the voices in her room again, but this time Beverly turns on her tape recorder. The recording is studied, and Data deduces that the strange voices are the voices of the crew.
Beverly and Geordi realize that they are trapped in a causality loop — a time warp that dooms them to endlessly repeat the same fragment of time. This phenomenon is causing Geordi's dizziness, and Data discovers that it also explains the voices on the tape, which are "echoes" from a previous loop. He isolates pieces of dialogue that indicate that the Enterprise collided with another ship, exploded, and got stuck in the time warp. Realizing that whatever they do to avoid the collision will probably be the same thing they have done before, Data decides the only hope is to send a deliberate message into the next loop. They prepare to send the message, the red alert begins again, and the ship is destroyed.
Another card game is in progress, but this time, the cards are different, with everything occurring in threes. Things continue to happen in sets of three, and the number three is seen everywhere for no explicable reason. Other than this difference everything occurs as before. When the red alert begins, Picard again chooses Data's advice over Riker's. At the last minute, however, Data notices the three pips on Riker's uniform and, realizing "three" was the message he planted for himself, takes Riker's advice and leads the ship to safety. The collision avoided, the crew is hailed by the older ship, the U.S.S. Bozeman. The Enterprise contacts Starfleet Command, who reports that they have been caught in a time warp for 17 days, while the other ship has been stuck for 90 years.