When the U.S.S. Enterprise is thrown into a time warp by a black star, it ends up orbiting Earth in the 20th century. Omaha Air Base detects a peculiar UFO and sends a fighter plane, manned by Captain John Christopher, to investigate.
The starship accidentally destroys the plane, caught in their tractor beam, so the pilot is beamed aboard. The problem now, of course, is to prevent Captain Christopher from returning to tell others on Earth. In order not to change history, in which Christopher's son will prove important, Kirk must return the captain to Earth without knowledge of the ship.
In an attempt to remove all records of the U.S.S. Enterprise sighting, Kirk and Sulu beam down to the air base. Kirk is almost immediately captured by the Air Police, though Sulu manages to escape and gets the stolen records to the U.S.S. Enterprise. Spock and Captain Christopher beam down to help get Kirk away from the Air Police. At the same time, an Air Police sergeant has been accidentally caught in the U.S.S. Enterprise's transporter beam and is reeling as he finds himself on a 23rd-century starship.
Spock and Scotty manage to recreate the conditions of the time warp that brought them to this time, with a slingshot effect around the Sun. The confused Air Police sergeant is returned to Earth a second before he was transported to the Enterprise, so he will remember nothing of his astounding experience, and the starship returns to the 23rd century.
This time, the pilot sees nothing and the Air Force concludes that the sighting was a mistake ... a UFO. In effect, everything that had happened, never happened.