The Melkot (or Melkotians) were a telepathic and xenophobic civilization from the Alpha Quadrant. The Melkot used their telepathic powers to punish aliens who encroached upon their space without permission (which, prior to 2268, they never extended).
The Federation made First Contact with the Melkotians in 2268, when the USS Enterprise encountered an orbiting warning buoy. When Enterprise Captain James T. Kirk ignored the Melkot warning to leave their territory and instead, assumed orbit and beamed down a landing party, the Melkotians passed harsh judgment on the landing party, describing them as "aliens" and "disease" and condemning them to death for their trespass. The form of execution was to be by telepathic projection of illusions that would be indistinguishable from reality and incorporate into them a believable lethality. This illusion took the form of the famous gunfight at the OK Corral in Tombstone, Arizona, on October 26, 1881, between the Earps and the Clantons, a fight that the Clantons lost. Kirk and the members of the Enterprise crew were to fill the part of the Clantons, but managed to avoid death by having their psyches hijacked by Spock, who used the Vulcan mind meld to alter their perception of reality. Faced with the opportunity to kill the recreation of Wyatt Earp, Kirk instead discarded his weapon. At that point, the illusion dissolved and the Melkotian buoy exploded. The Melkot appeared on screen, intrigued by Kirk's display of mercy towards Earp, and suggested that the Enterprise visit Melkot, where a delegation would come out to meet them. (TOS: "Spectre of the Gun")
The Melkotian was designed and manufactured by Mike Minor, who got the assignment after he managed to secure an active role in the production of Star Trek when he brought his portfolio under the attention of Gene Roddenberry, "Gene liked the artwork, and had me show it to the art director, Matt Jefferies. Jefferies bought about twenty pieces to use as art objects around the ship. Some of the critters were hanging in McCoy's office and cabin during the third season. A creature head I did in latex became the Melkot in "Spectre of the Gun". I later discovered that in my ignorance, I had stumbled upon the only route by which I could have sold to the show...by bringing art in on spec [rem: for free]. Union regulations prevented the production company from commissioning work from an outside contractor, but they could buy existing material.", Minor remembered. (Cinefantastique, issue 44, Vol 12 #5/6, p.59) He additionally added, "The next thing I did was the alien from "Spectre of the Gun", for Eddie Milkus [sic.], the post-production supervisor. I agreed to do it without ever having done castings or latex pulls from molds. I visited Verne Langdon, who was then at Don Post Studios. He gave me a few instructions and sold me my first can of latex. That job turned out very well, so they called me for more things." (Starlog, issue 25, p. 36)