Vaal

Vaal was a self-aware machine on Gamma Trianguli VI that was created by an unknown species approximately 10,000 years prior to its discovery by the crew of the USS Enterprise (NCC-1701).

By 2267, when the planet was visited by James T. Kirk and the Enterprise, there was a primitive culture of humanoids living on the planet who had formed a cult around Vaal and revered it as a god.

Vaal was ultimately destroyed by Kirk and the crew of the Enterprise when it killed several crew members and was deemed an unacceptable threat. This action by Kirk may have been in direct violation of the Prime Directive, but Kirk felt justified that the humanoids on the planet needed to be freed from their false god in order to achieve their full potential. 

Vaal Vaal ヴァール