“Things Past” is episode eight of season five of Star Trek: Deep Space Nine.
Sisko, Dax, Odo and Garak are heading back to DS9 in a runabout after attending a conference on Bajor on the Cardassian Occupation (one in which Garak made himself a little unpopular). Their runabout arrives at the station with them all on board, but unconscious, having passed through a plasma storm.
The four themselves appear to be on DS9 back when it was Terok Nor during the Occupation. Everyone thinks that they are Bajorans, and Dax is taken away by Gul Dukat for companionship. The other three try and find out which Bajorans they are, and when they do, Odo recognises the names as belonging to three Bajorans were were executed after a failed assassination attempt on Dukat. Back on DS9, it seems that damage they suffer in the vision of the past happens in real life too. If they are executed, as the original Bajorans were, they will probably die.
Although they appear to be in the past, some of the dates don’t correlate. Odo’s predecessor as chief of security is still doing the job, but other events happened whilst Odo was chief. So this isn’t time travel, or even a recreation of the past. It’s obviously something else; the problem is finding out what before they are killed.