Assignment: Earth ()
The Enterprise is sent on a mission back to Earth in the year 1968, where the crew encounters the mysterious Gary Seven, who claims to have been sent by advanced beings to save the planet.
The USS Enterprise, which has time-traveled to 1968 Earth for historical research, intercepts a powerful transporter beam originating from at least one thousand light-years away. A man called Gary Seven, dressed in a 20th-century business suit and accompanied by a black cat he calls Isis, materializes on board the Enterprise. Realizing that Captain Kirk and his crew are from the future, Seven warns Kirk that history will be changed if he is not released immediately. Having no proof of Seven’s claim, Kirk has him held in the brig. Meanwhile, Spock searches the history database and finds that the United States will launch an orbital nuclear weapons platform in a few hours.
With the help of his pen-sized “servo” device, Seven escapes and beams down to an office in Manhattan, emerging from a vault door hiding a teleporter. Addressing a voice-activated computer, he identifies himself as “Supervisor 194” (code name Gary Seven). He inquires about the whereabouts of two agents, “201” and “347”, who he learns have not been heard from in three days. Seven decides to complete their mission himself.
A young woman arrives, whom Seven mistakes for Agent 201, but is Roberta Lincoln, a secretary employed by the missing agents. Seven then tells Roberta he is a CIA agent. In appealing to her patriotism, he asks her to remain and assist him. The computer eventually discovers that Agents 201 and 347 have died in an automobile accident.
Kirk and Spock track Seven to his office. Roberta stalls them while Seven and his cat enter the vault and are teleported away. Arriving at “McKinley Rocket Base,” Seven gains access to the gantry and climbs onto an access arm to begin rewiring some circuits of the soon-to-launch rocket. When Kirk and Spock pursue Seven to McKinley Rocket Base, they are immediately detained by police. On the Enterprise, Chief Engineer Scott locates Seven and initiates beaming him up. At the exact moment, in Seven’s office, Roberta is experimenting with the vault controls. She inadvertently intercepts Scotty’s transporter beam, bringing Seven to the office.
Seven takes control of the rocket remotely, arming its warhead and sending it off course. McKinley Base controllers frantically try to regain control and, failing that, send a self-destruct command to the missile without success. After a failed attempt to call the police, Roberta hits Seven with a heavy cigar box and seizes the servo. Seven pleads with her to allow him to proceed, “…or in six minutes, World War III begins!” Kirk and Spock beam to Seven’s office. Seven pleads with Kirk to let him complete his plan, which is to destroy the missile at a low enough altitude to deter the use of such orbital platforms in the future. Kirk decides to trust Seven, who, with only seconds to spare, safely detonates the warhead at an altitude of 104 miles.
In the epilogue, Spock and Kirk explain to Seven that the Enterprise was meant to be part of the day’s events, citing their historical records. Seven is curious to know more, but they reveal only that he and Roberta will have an interesting future.