 When Khan 's sleep chamber malfunctions , he is transported to Enterprise , where he reawakens and learns he is in the 23rd century . Given spacious quarters while Botany Bay is towed to a starbase , Khan fascinates and charms the ship 's historian , Marla McGivers ( Madlyn Rhue ) , while using his access to the ship 's technical manuals to learn how to take over and operate Enterprise . McGivers agrees to help Khan revive the other supermen , allowing him to organize a mutiny . To coerce the Enterprise crew to cooperate with him , Khan places Captain James T. Kirk ( William Shatner ) in the ship 's decompression chamber and threatens to kill Kirk unless the crew submits . McGivers cannot stand by as her Captain dies and frees Kirk , who neutralizes Khan 's men by using a neural gas . Khan heads to engineering and sets the ship 's engines to self @-@ destruct , whereupon he is incapacitated by Kirk . Captain Kirk conducts a hearing , sentencing Khan and his followers to exile on an uncolonized world , Ceti Alpha V. Khan accepts Kirk 's challenge — invoking the fall of Lucifer in Milton 's Paradise Lost — and McGivers joins Khan rather than face court @-@ martial . Spock ( Leonard Nimoy ) wonders what the " seed " Kirk has planted will bear in a hundred years . 
