V'Ger incident

A giant machine entity threatens Earth

A vast machine entity calling itself V'Ger destroyed Klingon ships and a Starfleet station on its way to Earth, where it sought to find and join its creator.

In 2273 a huge energy cloud destroyed three Klingon battle cruisers and the Federation monitoring station Epsilon Nine and headed straight for Earth. The newly refitted USS Enterprise was the only ship able to intercept it. Admiral James T. Kirk took command from Captain Willard Decker, demoting him to executive officer, and gathered his old crew, including Spock, who had broken off his Kolinahr training on Vulcan after sensing the entity's mind.
Inside the cloud the crew found an enormous vessel. It abducted the navigator Ilia and sent back a mechanical copy to study the carbon units aboard. The entity, which called itself V'Ger, was searching for its creator and was prepared to wipe out life on Earth when it received no answer to its signal.
Kirk found that V'Ger was Voyager 6, a 20th-century NASA probe that had been found and greatly enlarged by a machine race. It had learned everything it could and wanted to join with its creator to evolve. Decker chose to merge with V'Ger and the Ilia probe, and the entity passed into a new form of existence, leaving Earth safe. These events are shown in Star Trek: The Motion Picture.