Doctor Bashir is preparing to attend a medical conference as Odo teases him about the fact that such conferences are always held at sunny beachside resorts. As they talk, Chief O'Brien enters the Infirmary, having dislocated his shoulder kayaking in the holosuite yet again. Bashir fixes O'Brien's arm but warns him not to go kayaking for a while.
The next day, the computer awakens Bashir at 0700, but he is extremely tired. He manages to drag himself out of bed, only to have Captain Sisko's voice come over the intercom, telling all senior offficers to report to Ops. There Bashir finds that Deputy Director Sloan has arrived from Internal Affairs and is discussing something grim with Sisko. When Sloan and Sisko emerge from the Commander's office, they announce that the crew will be confined to quarters until Sloan can investigate reports of a traitor passing information to the Dominion.
Now in his quarters, Bashir orders breakfast from the replicator, but finds it out of order. The door chime rings, and one of Sloan's officers informs Bashir that Sloan wants to ask him some questions. However, things do not seem right as she escorts him to the wardroom; a pair of officers carrying phaser rifles run past them in the corridor, but Bashir is told not to worry about it.
Sloan comes across as surprisingly charming when he meets with Bashir, casually asking about Bashir's experiences with the Dominion. They go over Bashir's imprisonment and encounter with a group of rogue Jem'Hadar, among other things. Before long, Sloan dismisses Bashir and promises to get the doctor his breakfast, as the replicators were taken offline as a security precaution.
Upon returning to his quarters, Bashir begins to suspect that someone has been there since he left, as things do not seem to be quite the way he left them. He receives a message from O'Brien, who says Sloan grilled the chief for over two hours -- and every question was about Bashir. Once the transmission cuts out, one of Sloan's deputies enters and escorts him back to the wardroom, where he is accused of being a Dominion spy.
In Sloan's version of events, the Dominion "broke" the doctor during his time in an internment camp. The allegation is that Bashir was coerced into spying for the Dominion but his memories are repressed; as such, even if Bashir is spying, he hypothetically would not know it. When Sloan realizes he will not get anywhere wih an interrogation, he has the guards escort Bashir -- handcuffed -- across the Promenade for all to see.
Later, Sisko intervenes and uses his power as commanding officer of DS9 to restrict Sloan's power over Bashir, but by this time even Sisko has begun to wonder if Sloan is correct. He believes his friend and colleague is telling the truth; however, he is unsure what to believe and reminds Julian he's made some very poor judgement calls recently. Sloan meanwhile has invoked an order from Starfleet Command telling him to "neutralize threats" to security, and he plans to put Bashir in prison until the war is over. However, as he speaks, Bashir is transported off the station by a Dominion-style transporter beam.
Bashir now finds himself aboard a Dominon warship, where Weyoun tries to convince him that he is in fact a Dominion spy. According to the Vorta, Bashir has gone through the same debriefing process a number of times, and the fact that the doctor does not believe his story does not surprise him. But rather than believing himself to be a spy, Bashir comes to believe Sloan is in fact the traitor. His conversation with Weyoun is interrupted as the ship comes under attack and Bashir is beamed aboard the Defiant.
This time, the crew all believe Bashir is a spy, and he is at a loss for words for why he was beamed aboard the Cardassian ship. His story about Sloan only sounds even more incredulous. As Bashir turns to O'Brien for support, the chief pushes him away, but Bashir realizes something is amiss. The chief's shoulder was dislocated previously, which leads Bashir to realize that none of the people around him are who they say they are.
Suddenly, the Defiant's bridge disappears and Bashir finds himself in a holosuite aboard a Federation starship, surrounded by men in black uniforms. Among them is Sloan, who reveals that Bashir was beamed off of DS9 in his sleep so that no one would notice his absence. This explains a number of things, among them why Bashir was so tired at the start of his day. Sloan reveals that he is part of a covert organization known as Section 31, which he claims was part of the original Starfleet charter but answers to no one. Although Sloan tries to recruit the doctor into the organization, Bashir refuses.
When he returns to DS9, Bashir of course finds that there is no record of anyone called Director Sloan, but Sisko's investigation with Starfleet Headquarters on the matter turns up some odd results. Sisko receives neither confirmation nor denial of Section 31's existence, only promises to look into the matter. Whatever the true nature of Section 31 may be, it is clear that we have not heard the last of Sloan.