“Past Tense: Part 2” is episode twelve of season three of Star Trek: Deep Space Nine.
In the previous episode, “Past Tense: Part 1”, Sisko, Dax and Bashir had been sent back to 2024 in a teleporter accident, arriving just before a pivotal event. The most important figure in the event, Gabriel Bell, unfortunately died helping Bashir and Sisko, which changed the future.
In the present, the Defiant is the only part of Starfleet left, and the nearest inhabited thing to Earth is a Romulan base on Alpha Centauri (it’s never stated just what actually happened on Earth itself). What made the transporter accident happen in the first place also made the Defiant immune to the changed timeline. Chief O’Brien and Major Kira start going back to several points in history to try to find the missing crew.
Back in 2024, Sisko has taken on the identity of the dead man, in the hopes of making sure that history turns out the way it did before. The riot at the Sanctuary has now happened, and the police will eventually storm the place. On the outside, Dax is trying to get into the Sanctuary and find the other two.
Of course, if the Defiant hadn’t been immune to the timeline effects, the three of them would probably have been stuck in the past no matter what happened.