The Enemy Within (Star Trek)

While orbiting the planet Alfa 177, the U.S.S. Enterprise experiences a transporter malfunction when Technician Fisher is beamed up from the planet with some magnetic ore on his clothing. Scotty checks the transporter and finds nothing wrong, so Captain Kirk beams aboard. Kirk leaves with his officers and when the transporter room is deserted, a second Kirk materializes on the pad.

When a space animal is beamed aboard the starship and splits into two entities; one tame and one vicious, it is discovered that the same thing has happened to Kirk. While one Kirk is good and honorable, the other is evil and runs amok on his ship, committing violent acts, including the attempted assault of Yeoman Janice Rand.

Meanwhile, the transporter continued to split objects into two entities, thus forcing the remainder of the ship's landing party to remain on the planet's surface. Alfa 177's approaching night promises certain death from exposure and freezing temperatures to the unprotected landing party.

As time passes, the "good" Kirk is weakening, losing his ability to make decisions, while his "evil" half is dying. Neither Kirk can survive without his other half. Time is running out, not only for Captain Kirk, but for the landing party on the planet's surface.

Scotty effects repairs on the transporter, but there's no time to test it. McCoy is fearful because the "space dog" which had been split earlier, had gone through the repaired transporter and, while joined into one animal, was dead. Kirk takes the chance and beams down with his counterpart and returns to the U.S.S. Enterprise whole and alive. Quickly the landing party is beamed aboard, worse for the cold, but alive.