Contagion ( episode ) The " Enterprise " and a Romulan warbird are attacked by the same computer virus that has already destroyed one Federation starship of the same class as the " Enterprise " . Summary . Teaser . The " Enterprise " responds to an urgent call from Captain Donald Varley , an old friend of Captain Picard . Varley ' s ship , the , the sister ship of the " Enterprise " , has been plagued by a series of system malfunctions while in the Romulan Neutral Zone . Upon rendezvousing with the " Enterprise " , Varley explains to Picard that he was investigating " rumors . . . that started making the Iconian s sound a lot less like legend " and had , in fact , located the planet Iconia in the Neutral Zone . As Varley continues , revealing his goal of preventing the Romulans from gaining Iconian technology , his transmission to the " Enterprise " cuts in and out . Worf detects a failure in the " Yamato " s antimatter containment chamber . Before the " Enterprise " crew can act , the " Yamato " explodes and all 1 , 000 + crew members and their familes are killed . Meanwhile , a Romulan warbird ( ) enters the " Enterprise " s sensor range . Act One . The " Enterprise " is trying to find out whether this Romulan warbird is responsible for the destruction of the " Yamato " . After Picard and Sub - Commander Taris of the " Haakona " exchange accusations , the " Haakona " cloaks , and the " Enterprise " crew begins investigating the " Yamato " s destruction . Chief Engineer Geordi La Forge and Data determine that the antimatter containment failure was not caused by the Romulans , and even entertain the possibility that a design flaw in starship s was responsible . As the investigation continues , Picard searches through Captain Varley ' s personal log to more thoroughly understand his friend ' s intent , asking the computer to highlight the words " Romulan " and / or " Iconian " in the log . In the archived logs , Varley describes finding Iconian artifacts , locating their homeworld , a puzzling Iconian probe scan , and the increasingly dangerous systems failures affecting his ship . In his final entry , he is determined to convince Picard of the importance of this mission to the safety of the Federation . Picard ' s ready room door fails to immediately open as he approaches , the first sign of trouble on the " Enterprise " . The bridge crew observes a visual record of the Iconian probe scan mentioned in Varley ' s log , and Data determines the coordinates at which this event occurred . Picard decides to take the " Enterprise " to this planet , on the far side of the Neutral Zone , and assume the " Yamato " s mission – a mission that Picard believes will prevent a war . Act Two . Wesley Crusher talks privately with Captain Picard about the Iconians , who were remarkably technologically advanced and were rumored to be able to magically appear on planets throughout the galaxy . However , Picard sees through Wesley ' s cover and asks him what really brought him into Picard ' s ready room . Wesley confesses that he can ' t stop thinking about how all the people on the " Yamato " were just suddenly dead and he states he doesn ' t know how Picard and Riker and the others can handle that so easily . Picard reassures Wesley that they are able to handle it because they have been trained to do so , as Wesley will be . However , Picard starts to remark about how the death of a single individual fails to move them , then is interrupted by a malfunction in the replicator . Picard has ordered Earl Grey tea from the replicator , and instead of tea , a potted plant materializes . " " Now that should not have happened , " " he remarks to Wesley . La Forge begins to suspect that the Iconian probe had something to do with the " Yamato " s destruction , but has no explanation for the apparently random problems being experienced on the " Enterprise " . Upon arrival at the Iconian homeworld , the " Enterprise " finds the planet largely destroyed from orbit approximately 200 , 000 years prior . One small energy signature remains , however , and soon a probe is launched toward the " Enterprise " . Picard initially intends to capture the probe in a tractor beam , but a frantic La Forge , now aware of the imminent danger but unable to contact the bridge due to an intercom failure , takes a wild turbolift ride to the bridge , thrown all about the turbolift as it races through the turbolift shafts , including being stuck at the top and bottom of the lift car . He is thrown about so violently that his VISOR is knocked off of his face . Upon arriving on the bridge , La Forge is literally thrown out of the turbolift and is assisted to his feet by Riker just in time to warn Picard to destroy the probe . Picard orders Worf to destroy the probe and after he does so , La Forge tells Picard that if the probe had successfully scanned the " Enterprise " , there would have been no chance of saving the ship . Act Three . In the observation lounge , La Forge explains that the Iconian probe was transmitting an alien computer program to rewrite software in its own image . That was the cause behind the " Yamato " s systems failures . The " Enterprise " was not scanned by the probe , but did download the " Yamato " s log before its destruction , and contained within the log was the alien program . This means the " Enterprise " has a little breathing room , but likely not enough . As La Forge and Data work on correcting the problems , Picard realizes that information on the planet may be useful . He decides to lead an away team to the planet ' s surface – over Riker ' s objection – to find this information . As soon as Picard , Data , and Worf beam down to the surface , a Romulan warbird decloaks in orbit near the " Enterprise " . The " Haakona " attempts to fire photon torpedo es but appears to be experiencing problems similar to those of the " Enterprise " , leading Riker to conclude that they too have tapped into the " Yamato " log . When another probe is launched from Iconia , Riker informs Taris to destroy it , which she does . But because of the remaining Romulan threat , Riker wants the shields to stay up , meaning that the away team cannot return to the ship . Act Four . On the surface of Iconia , the away team cannot establish contact with the " Enterprise " . Picard and Data attempt to make sense of a large console in the Iconian control room . Data determines that the Iconian language shares enough common roots with other languages to enable him to develop a working understanding of the controls . This understanding proves to be somewhat less than " working " , as Data ' s attempts to engage " manual override " result in the appearance of a gateway . A series of landscapes and architectures cycles through the gateway . Picard concludes that the Iconians traveled to distant worlds through this gateway " as easily as we would cross a room . " This is what Captain Varley was investigating and hoping to keep out of Romulan hands . As the team continues to stare into the gateway , an image of the " Enterprise " bridge appears briefly , offering a potential means of return to the ship . Meanwhile , Data appears to gain access to an underground power source activated by the gateway ' s appearance , but as he works the controls , an energy surge similar to the Iconian probe ' s transmission cripples him . Act Five . Picard and Worf try to assist Data , but his software is being rewritten by the Iconian program . Picard realizes that he must destroy all the Iconian technology , and asks Data how to go about that . He also orders Worf to destroy his tricorder containing everything they have learned thus far about the Iconians to keep the information from getting into enemy hands . Deciphering Data ' s broken speech , Picard surmises that he can launch all the Iconian probes but override the launchbay doors , so that the backwash from the rockets spills into the power grids to create an overload . Data is able to give Picard the correct key sequence for launching the probes ( " blue - amber - amber - red " ) and for overriding the doors ( " blue - blue - blue " ) . Picard orders Worf to take Data through the gateway the next time the " Enterprise " appears . Worf arrives on the " Enterprise " with Data and takes him to engineering . La Forge ascertains that all of Data ' s systems " are just going crazy " but cannot help him . He laments not having an expert on Soong - type android s such as Maddox on the " Enterprise " to help with Data . The beeping emanating from La Forge ' s tricorder turns into a continuous tone , and it appears that Data has died . On Iconia , Picard presses " blue - amber - amber - red " on the console , waits a moment , then enters " blue - blue - blue " . In engineering , Data ' s eyes suddenly open and he sits up , apparently fully functional , but confused as to why he ' s on the " Enterprise " . La Forge surmises that Data ' s self - correcting mechanism wiped all memory affected by the Iconian program in order to save him ; this had required a " cold boot " , thus why Data had briefly shut down and why he knows nothing of events since he was infected . La Forge proposes a similar procedure for the " Enterprise " : a complete shutdown , a wipe of all affected memory ( including the " Yamato " logs ) , and then a reload of systems from the protected archives in the central computer core . Riker is worried about doing this while the " Haakona " is nearby , but La Forge points out if they don ' t do this , they ' ll die anyway when antimatter containment inevitably fails , and Riker authorizes the procedure . Picard appears to have been successful . Seeing that the control room itself will be destroyed in moments , he decides to go through the gateway rather than die on Iconia . As he approaches it , the scenery switches from a pristine planet to the bridge of the " Haakona " . Given the options , he quickly makes his decision . The Iconian program has been successfully removed from the " Enterprise " s computer , and Chief O ' Brien searches for Picard on the planet . But as soon as the transporter locks onto him , Picard vanishes . O ' Brien soon locates him on the warbird , where Picard learns that the Romulan ' s auto - destruct sequence is active and cannot be disengaged . When O ' Brien beams him back to the " Enterprise " , Picard orders the bridge to move the " Enterprise " away because of the impending explosion of the warbird , but Riker intervenes and offers Taris the solution to purging her computer systems . Having succeeded in preventing war with the Romulans , the " Enterprise " leaves orbit of the now entirely barren Iconia , as explosions continue to detonate on the horizon . Eventually , the " Haakona " , apparently able to purge its systems , leaves as well . Memorable quotes . " " The risk would be allowing the Romulans to locate Iconia . Fortunately , I got there first . It ' s a virtually dead planet , but enough technology remains to give the Romulans an edge if they should find it . " " " " We ' re going to assume the " Yamato " s mission . " " " " And risk a war ? " " " " Perhaps . . . prevent one . " " " " Didn ' t you order tea , sir ? " " " " Now , that should not have happened . " " " " The knitter isn ' t working . " " " " Try a splint . " " " " Doctor ? " " " " Splint . It ' s a very ancient concept . You take two flat pieces of wood or plastic , a bandage . The broken limb is kept immobile . " " " " That ' s crazy ! That ' s not practicing medicine ! " " " " Oh , yes it is ! It ' s a time honored way to practice medicine : with your head , and your heart , and your hands . So jump to it . " " " " Data ? " " " " Yes ? " " " " What happened ? " " " " Any answer would be mere speculation . This is yet another example of how our actions have random results . " " " " Thanks , Data . . . I noticed . " " " " Sir , the shields are back up ! " " " " Impeccable timing . " " " " Sir , the shields are back down . " " " " If it should become necessary to fight , could you arrange to find me some rocks to throw at them ? " " " " Fate : Protects fools , little children , and ships named " Enterprise " . " " " " I have claimed this planet for the Romulan Empire . " " " " This is the Neutral Zone . No one can claim anything . " " " " You will withdraw , or I will be forced to destroy your ship and your away team ! ! " " " " In another time and place , this could be funny . " " " " This would appear to be manual override . " " " " That was " not " . . . manual override . " " " " I am accessing ! " " " " May I help ? " " " " Do you wish to evacuate all non - essential personnel to the " Enterprise " , sir ? " " " " No , that ' d be premature . " " Links and references . References . 200 , 000 years ago ; antimatter chamber ; antimatter containment ; archaeology ; " As You Like It " ; auto - destruct ; battle cruiser ; biobed ; caveman ; China ; cloaking device ; computer program ; ; Denius III ; Dewan ; Dinasian ; Earl Grey tea ; fate ; Federation ; ; " Haakona " ; hiccup ; hide and seek ; humor ; hydrogen ; Iccobar ; Iconia ; Iconian ; Iconian gateway ; Iconian language ; Iconian probe ; Iconian software transmission ; Jefferies tube s ; knitter ; ; magnetic seal ; matter - antimatter reactor ; meter ; Milky Way Galaxy ; Number one ; orbital bombardment ; photon torpedo ; ; power transfer tunnel ; ; red alert ; rocket ; Rosetta Stone ; Romulan cruiser ; Romulan language ; Romulan Neutral Zone ; Romulan s ; splint ; starfield ; Starfleet Academy ; stellar drift ; Stone Age ; stutter ; triangular ; tribe ; tricorder ; ; " Yamato " engineering team ; " Yamato " engineers ; " Yamato " first officer Library computer references . USS " Yamato " schematic : antimatter confinement ; antiproton ; antiproton injection seal ; antiproton injection subsystem ; Bussard collector ; Bussard collection coil ; deuterium injection subsystem ; deuterium injector ; deuterium tank ; dilithium regulation chamber ; fusion reaction subsystem ; fusion reactor ; impulse power ; nanosecond ; plasma injector ; spin reversal system USS " Yamato " log entries : ;