Nomad

Nomad was an antagonistic character from Star Trek: The Original Series - originally designed by humanity as an advanced probe it would merge with an alien probe that caused it to malfunction and made it a serious danger to organic life until Captain James T. Kirk of the U.S.S. Enterprise managed to convince the machine to destroy itself via using its own logic against it.

History
Nomad was launched from Earth in 2002 as the planet's first interstellar vessel to seek out new life. It was a prototype and the only one of its program built.

During its mission, Nomad was damaged by a meteorite and lost contact with Earth. It later encountered an alien probe called Tan Ru in deep space. The two units merged, resulting in a powerful new construct with faulty programming, which destroyed anything that was perceived as imperfect, a condition that apparently applied to any organic living being.

Travis Mayweather had a model of the Nomad probe in his quarters aboard Enterprise.

Nomad was eventually discovered by the USS Enterprise in 2267, shortly after it wiped out four billion inhabitants of the Malurian system. Originally deeming the Enterprise to be as imperfect as the Malurians, it opened fire on the vessel, nearly destroying it. It halted its attack when Captain James Kirk hailed the probe and introduced himself; Nomad had mistaken Captain Kirk for Roykirk.

Upon coming aboard the Enterprise, Nomad found the crew to be imperfect and wiped out the memory of Lieutenant Uhura as well as killing Montgomery Scott. Fortunately for Scotty, Nomad was able to "repair" him on the orders of Kirk. Using the ship's star charts, Nomad was able to fix coordinates on Earth and planned to return. Kirk was concerned that if Nomad returned to Earth and found it to be populated with imperfect lifeforms, it would sterilize the planet. Captain Kirk managed to convince Nomad that it was imperfect after it mistook Kirk for Roykirk, its creator. This led Nomad to eventually destroy itself, though Kirk was able to beam it out into space before it did so.