Counter - insurgency program The counter - insurgency program was a security measure designed for a hypothetical revolt by Bajoran laborers aboard Terok Nor . It was installed by its commanding officer , then - Gul Dukat , during the Occupation of Bajor because the Bajorans far outnumbered their Cardassian overseers . The program was designed so Dukat and his fellow Cardassian officers could interact with and control it , but if necessary , the program could run independently . It had several modes of operation to allow it to deal with a variety of scenarios . Certain actions or events could trigger the program , and it would thereafter automatically detect signs of a deteriorating situation and respond accordingly . The measures the program was capable of executing ranged from alerting Cardassian authorities to destroying the entire station . Naturally , Dukat omitted mention of the program ' s existence when control of what was now called Deep Space 9 passed to Benjamin Sisko in 2369 . ( ) Design . Although the Cardassian guards normally kept the Bajorans in line , Dukat and his superiors wanted to ensure they were prepared for the worst . He inconspicuously buried the counter - insurgency program deep inside one of the station ' s computer s , which was accessible from computer stations within ore processing . In the event of a worker revolt , the Cardassians were instructed to execute the otherwise innocuous - looking file , and it would deal with the problem until such time as the Cardassians regained control and deactivated it . Dukat made several recordings of himself so he could address the workers via the program , creating the appearance that he was in full control even if he became incapacitated . When the program was activated , the station ' s operations center would be alerted to the situation as his message attempted to negotiate with the workers . Though he promised to be lenient if they surrendered , the military officials whom the program attempted to contact through subspace communication s would have had no intention of keeping Dukat ' s promise . If the leader of the revolt informed the computer of their surrender , it would wait for Cardassian authorities to enter an access code . Should the Cardassians fail to deactivate the program or the situation escalate further , it would flood ore processing with neurocine gas . If the workers escaped or the insurgency spread and resulted in an escape from ore processing , the program was set to take control of the station . Force field s would secure sensitive areas of the station ' s computer circuitry , Ops and the security office , with similar force fields blocking access to virtually every major doorway on the station . Cardassian officers had the ability to disable these individually long enough to pass through , but a dampening field and other measures would prevent any communication to or from Ops ; only the proper command code s could disable the lockdown . If this did not give the Cardassians the proper means by which to stop the insurgency , level two would be initiated . Triggered by the Bajorans attempting to bypass any of the security measures which had been put in place , level two was relatively simple : Dukat threatened to fill the entire habitat ring , which housed the workers ' families and friends , with neurocine gas . At this point , all Cardassian personnel would be advised to evacuate the area accordingly . The third level could be triggered by Bajorans bypassing the force field s guarding Ops , presumably thereby gaining access to all of Terok Nor . If the program had not been deactivated by this point , Dukat was presumably dead and the situation hopeless , so a two - hour self - destruct sequence would be set into action . The fourth and most severe level was triggered in the event that tampering was detected with the counter - insurgency program itself ( for example , by counterfeiting the authorization code of Dukat ) . At this level , the replicator in the operations center would produce and power a device that fired random phaser bursts at non - Cardassians . Legate secretly added another level to this sequence : Should Dukat attempt to abandon his post while the auto - destruct sequence was in action , all security codes would be revoked , essentially making the auto - destruct irreversible . Messages . When the program was triggered , Dukat ' s image would appear on the computer screens of not only ore processing but other areas of the station as well . This was to prevent the revolt from spreading , if it hadn ' t already . Dukat issued a formal ultimatum , and until such time as the program was deactivated , his automated messages would play out to meet the changing conditions of the situation . The introduction was thus : Another reminder accompanied the warning after several minutes . Due to the potentially violent situation , no new guards would be sent to ore processing unless the Bajorans informed the computer of their surrender . If they did so , Dukat would respond accordingly . However , even if they did claim to have surrendered , the Cardassians were the only ones who could confirm for the program that the situation was under control . If they failed to do so , it would assume the workers had refused to surrender and were still openly hostile . Dukat intended to make one final attempt to reconcile with the workers before killing them . As usual , he had prepared a rather lengthy speech for the occasion . If the Bajorans had neither tired of hearing Dukat ' s voice nor given up hope by this point , he would continue : The next warning was given in the event that the workers escaped ore processing . As the station - wide counter - insurgency program was initiated , Dukat would " up the ante " so to speak . Another warning was put into place to prepare to make good on this threat . With the force fields and other measures in place , trapping civilians in their quarters , level two threatened something else the workers would care about : The third level was a last resort prior to destruction of the station . With the self - destruct sequence activated , Dukat would have to either deactivate it with his security codes or die on the station . Kell ' s recorded message , should it be played , would be for Dukat rather than the workers . Discovery . The program was discovered by Miles O ' Brien in 2371 while he and Jake Sisko , who was apprenticing him at the time , were investigating the possibility of turning the ore - processing area into a deuterium refinery . Commander Sisko was with them at the time , checking up on their progress and surveying the unused ore - processing facility . Upon discovering the unnamed anomalous file , O ' Brien set it aside for further examination in the future ; however , doing so triggered the program and set it into action . As the Siskos and O ' Brien were trapped in ore processing and the station ' s computer systems were taken over by the counter - insurgency program , the senior staff of DS9 were helpless , as they had been completely unaware of the program ' s existence and did not know how to combat it . Customers in Quark ' s were frightened by the messages , while Quark himself visited Odo in the security office . He believed it was the safest place to be while the program was in effect ; unfortunately , he was wrong . Quark ended up trapped with Odo because Dukat had apparently not trusted the Changeling to side with the Cardassians and Odo was thus unable to access the computers or disable the force field surrounding his office . Implemented by a man who knew more about DS9 than anyone stationed there at the time , the program was uncontrollable . Jake Sisko managed to climb up a shaft , which did not have security precautions as it would have been filled with molten uridium during the occupation , and helped his father and O ' Brien escape the main processing area . While this allowed them to escape the neurocine gas , they were still trapped , cut off from the rest of the station , and unable to use their combadges . They did attempt to escape , but in doing so inadvertently caused the program to believe the insurgency had spread . Lack of knowledge about the program caused the crew to activate the program ' s higher levels once the station - wide program took effect . Jadzia Dax , trapped in Ops with several other senior officers , triggered level two by attempting to tamper with the force fields protecting the computer systems . Although the Cardassian tailor Elim Garak , a former operative of the Obsidian Order , successfully cracked Dukat ' s code and gained access to the system , he was unable to bypass the program . Major Kira , in a desperate attempt to save the civilians in the habitat ring , fired her phaser at the environmental control computer console ; however , this caused level three to activate . Although the neurocine threat was no longer in effect , the self - destruct sequence had now begun . As Garak continued to work with the computer , it constantly challenged him to prove his identity . Meanwhile , Kira and the others attempted to disable the self - destruct , having bypassed a force field and gained access to some of the critical computer hardware in Ops . However , the computer sensed the interruption and triggered level four – the replicated phaser device . At least one Starfleet officer was confirmed killed while attempting to flee the automatic fire . Meanwhile , Dukat had received a subspace message from himself about a worker revolt and he arrived shortly , quite amused . He planned to " negotiate " with Kira before releasing the self - destruct program . He was eager to gain a Cardassian presence on DS9 , and he offered to end the program if some of his men were allowed to be stationed there . Neither of them expected Bajor or the Federation to honor an agreement made under such a threat , but as Dukat put it , " " I don ' t expect them to be happy about it . But once my troops are in place , I think you ' ll find it very difficult , to get them to leave . " " Kira was faced with a choice between sacrificing 2 , 000 people and losing DS9 to the Cardassians . However , when Dukat attempted to beam back to his ship to allow her to " consider " his request , he triggered Kell ' s hidden message . Without his access codes , Dukat was unable to deactivate the program or escape the station . On the lower decks , Jake , Chief O ' Brien and Commander Sisko managed to get to the access tube to the fusion reactor . However , a plasma fire had ignited in that tube . Commander Sisko still managed to get around it , and redirect the energy from the overload to the shields just in time .