Disaster strikes when a fight breaks out because Sisko and Bashir resist attempts to steal the food cards they have been given. A man who comes to their aid is killed, and Sisko and Bashir discover after the fact that he was Gabriel Bell. They have inadvertently caused the death of the man who must lead the uprising just days from now. If the Bell Riots never occur, Earth's history will take a different course. Sisko decides he must make sure these events happen as they did, and he takes on the identity of Gabriel Bell. Back in the 24th century, the crew left on the Defiant, Major Kira, Odo, and Chief O'Brien, lose contact with Earth as all traces of the Federation suddenly vanish; Bell's death has radically altered the timeline. They begin to perform calculations and get ready to use the transporters to zero in on the location in time of their lost crewmembers. Kira and O'Brien make several test trips, always ending up in the wrong point in time. They continue to work on the problem.
Sisko (as Bell) and Bashir return to the employment center just as it is stormed by a group of disgruntled Sanctuary Residents and its staff and police officers taken hostage. Sisko takes on leadership of the revolt, trying to ensure that no one gets hurt, and understanding that at the resolution of the revolt Gabriel Bell must die. He makes demands to the governor, insisting they be given airtime to express their grievances. He wants the Sanctuary Districts closed and he wants the people to be given opportunities to earn an honest living.
The riots are in full swing outside. Dax watches from Brynner's office, knowing Sisko and Bashir are caught in the Sanctuary District and are in danger, and heads down to find them. She sneaks through the lines via a sewer pipe and is caught and delivered to the employment center to explain herself. There Sisko and Bashir catch up with her in secret. She sneaks back out, certain that Brynner will be able to order a terminal activated at the employment center so that the leaders of the revolt can tell their stories and have them broadcast worldwide, which was the main force that turned the tide of opinion, leading to the end of the Sanctuary Districts.
With only enough energy for one more transport, Kira and O'Brien finally transport themselves to the correct time in history and contact Dax. They stand by to rescue Sisko and Bashir if they can. It is a close call as the SWAT teams move in on the employment center to end the riot once and for all. They open fire, killing the leaders of the revolt; Sisko takes a bullet in the shoulder to protect the hostages and survives. Once the riots are over, the two police officers who first confronted Sisko and Bashir agree to slip Sisko's identification (with Bell's name) onto one of the dead men, and also to tell the truth about what has happened here. The DS9 officers are beamed back to the Defiant in the 24th century and find everything back to normal, history having unfolded just as it should have. The only difference in time (as revealed at the end of the episode) is that Bell's entry in the historical records now shows Sisko's picture in place of his own.