Star Trek The Next Generation: Cause and Effect

The episode opens on the bridge of the Enterprise-D, which has suffered heavy damage to one of its warp nacelles. A warp core breach is unavoidable, and Captain Picard issues the frantic order, "All hands abandon ship! Repeat, all hands abandon..." as the ship explodes.
The next scene appears to take place prior to these events as Picard describes in a Captain's log that the Enterprise is exploring the Typhon Expanse. Riker, Crusher, Worf, and Data are playing cards, where Dr. Crusher calls Riker's bluff and wins the round. Crusher then goes to sickbay to treat Geordi La Forge for dizziness, but feels that she's performed the same procedure before. After she goes to bed, she is haunted by strange voices.
Soon after, the Enterprise loses power as a space-time distortion erupts nearby, and a second Federation ship emerges from it on a collision course with the Enterprise. Attempts to hail the other ship prove unsuccessful; Riker suggests decompressing the main shuttle bay (as the escaping air would hopefully push the Enterprise out of harm's way), but Data suggests using the tractor beam to deflect the oncoming ship, to which Picard agrees. The ship is deflected, but not enough to avoid striking the starboard nacelle. The Enterprise is again destroyed by a warp core breach as it was in the opening sequence.
The next scene begins as before with the Captain's Log, but Riker knows Crusher will call his bluff, and in the sickbay both La Forge and Crusher get a strong sense of déjà vu. After hearing the voices, Crusher discusses the occurrences of deja vu and voices with Picard in private. The bridge crew briefly discuss the auditory anomaly before they are interrupted by the appearance of the space-time distortion, and the Enterprise is again destroyed.
Back at the card game Crusher knows in advance which card will be dealt, and of La Forge's arrival in sickbay. She finds that La Forge's visor is translating disturbances in the surrounding tachyon field into visual images. Later, she scans her quarters with a tricorder when the voices are present. In engineering Data and La Forge go over a recording made by the tricorder. Data detects approximately 1000 voices, all from Enterprise personnel. The crew determine that they are caught in a causality time loop, which carries echoes from previous iterations in the form of a tachyon disturbance. They decide to send a modulated tachyon emission to the next time loop that can be picked up "subconsciously" by Data's positronic brain, but are unsure of what message to send. On the bridge, after the oncoming ship is unsuccessfully deflected, Data relays a message seconds before the Enterprise explodes.
At the next cycle Crusher incorrectly guesses the cards, as Data has reshuffled the deck to emphasize instances of the number three. Data encounters further instances of three. The crew discuss the recording of the voices and the numerical message but are unsure of its meaning. On the bridge, as the ship materializes from the space-time distortion, Data again suggests using the tractor beam. Before he carries out the procedure, he recognizes the significance of the number three in the form of Riker's rank insignia. He decompresses the main shuttle bay, which moves the Enterprise enough to avoid a collision, and also clear of the distortion.
Comparing the ship's chronometer with a Federation timebase beacon indicates the Enterprise has been stuck in the time loop for 17.4 days. They are hailed by the USS Bozeman, a Soyuz class vessel, a class which has not been in service for over 80 years. Captain Picard then has the peculiar duty of welcoming the Bozeman's captain Morgan Bateson(Kelsey Grammer), who believes it is the year 2278, to the 24th century.