is on a starcharting mission on the edge of a galaxy in the vicinity of Questar M-17. They suddenly discover they're being pulled into a dead neutron star and are unable to approach course. As they approach, Uhura picks up a radio transmission from the star up ahead. Kirk has Sulu engage flank speed and they slip into orbit around the neutron star just before impact. Kirk speculates they can use a slingshot effect to escape the star's gravitational pull. Uhura pinpoints the radio transmission to its source: an enormous alien ship, consisting of dozens of large metallic pods connected by a bridgework of narrow connectors. Spock scans the ship and determines that it has been dead for over 300 million years.
Kirk beams over with Spock, Scotty, and McCoy, using life support belts. Once aboard, they discover that the ship's metallic hull has been spun like a spider, and the pods have a hive-like construction. Each pod has been burst open from the inside, as if the crew destroyed the ship themselves. After updating the Enterprise
, the landing party goes inside the nearest pod and it begins to come to life: the ship has been designed to absorb any and all ambient energy to maintain minimum function. They come to a sealed chamber and use a phaser to gain entrance. Once inside, the door automatically clsoes behind them while life support switches on. They discover that their equipment has been trained of energy and are unable to contact the Enterprise
or cut through the hull. Examining the central control panel, they find a jury-rigged piece of equipment that generates an anti-magnetic field. Something tries to enter the control room through the doors, but the shielding device prevents it for the time being. The viewscreen activates and the alien captain appears, repeationg a warning of some sort. Spock translates it and the captain explains that an alien life form possessed their ship and the crew destroyed it rather than risk the chance it would use them to travel away from the star. The screen explodes and the entity penetrates the door. With the interference gone, Kirk calls the Enterprise
for beam out. They materialize in the transporter chamber, only to discover the entity, an energy cloud has beamed over with them. It slips into the ship's systems, as an alien crackling fills the intercom systems.
Kirk and Spock go to the bridge where everything seems to be functioning normally. Spock activates the bridge defense system, a phaser beam emitter array, and Kirk orders Scotty to prepare the ship for possible self-destruct in case they have to take the same steps as the alien crew. Life support starts to shut down as Spock detects an erratic magnetic pulse. Scotty is trapped when the core hatch closes on his waist, and only his life support belt prevents him from being cut in two. With the systems jammed, Kirk has two engineers cut through the hatch's hinge with cutter beams. They get Scotty free just before his life support belt cuts out. Meanwhile, the phaser banks activate seemingly on their own and fire on the alien ship, destroying it. Returning to the bridge, Kirk and Spock discover that the ship no longer responds to their commands and life support has been cut off on the majority of decks. The warp core is inaccessible and the cutter beams have drained of energy, preventing them from activating self-destruct. Kirk orders Spock to create an anti-magnetic static shield to protect the navigation shields.
As the struggle to regain control of the ship, they conclude that the neutron star's magnetic field restricts the entity and it needs a starship to escape the star's influence. The entity announces itself, addressing them through the intercom system, and tells them that they will provide it with escape. It absoirbs all of the information from the memory banks and then tells them to remove the completed static shield. When Kirk refuses, it opens fire with the bridge defense array, pinning Kirk down. When Spock tries to help him, it pins Spock to the console and tells them to deactivate the static shield or it will kill him. Kirk agrees... then slaps his life support belt on the navigational console, fusing the warp controls. The entity demands they fix the controls and Kirk tells Scotty to rig auxiliary functions. As he does so, Kirk quietly discusses the situation with Spock, who has identified the entity as a form of primal energy capable of taking over the higher functions of the Enterprise
much as a human brain controls the body. It's growing stronger and Kirk tells Spock to mentally calculate a slingshot escape route without using the ship's computers and giving away their plan to the entity. Spock warns that the entity can reproduce through mitosis and spread to every ship and planetary computer that they encounter, propagating itself across the galaxy.
When repairs are completed, Kirk tells the entity that they must be activated manually. The entity chcecks the computer banks and concurs, ordering him to take them out of orbit. Kirk activates the controls, dropping the Enterprise
out of orbit on a collission course with the neutron star. The entity opens fire on Kirk, who is barely protected by the life support belt's force field. The life form demands that they stop but Kirk ignroes it and tells Spock to prepare the warp drive. The entity panics and abandons the ship, only to be absorbed within the neutron's magnetic field. The Enterprise
goes to warp and passes through the neutron star. As they leave, they can hear the trapped entity pleading with them not to abandon it to loneliness.