"Spectre of the Gun" is the sixth episode of the third season of the American science fiction television series Star Trek.
Written by the series' former showrunner, Gene L. Coon (under the pseudonym of Lee Cronin), and directed by Vincent McEveety, it was first broadcast on October 25, 1968.
In the episode, having been found trespassing into Melkotian space, Captain Kirk and members of his crew are sent to die in a surreal re-enactment of the Gunfight at the O.K.
The crew soon discovers that men dressed as the Earp brothers; Virgil, Wyatt, and Morgan, as well as their deputy Doc Holliday, are preparing to fight them at the appointed time.
Knowing that in real history the gunfight was fatal to most of the Cowboys, the Enterprise crew try to change their fates by getting the sheriff and the townspeople to stop the fight and even attempt to negotiate with the Earps, but nothing works.
Spock realizes from the failure of the gas grenade and the "death" of Chekov that the world they are in does not conform to the laws of reality and persuades the others that as long as they are convinced of that they cannot be harmed.
As money was not available for a full set, director Vincent McEveety was asked to use a stylized Western street of false building fronts and no sides.
Club gave the episode a 'B+' rating, marking it down for loose writing but praising its impressive final showdown and "weird, arrhythmic vibe working for the show for once".
[10] This episode was released in Japan on December 21, 1993 as part of the complete season 3 LaserDisc set, Star Trek: Original Series log.3.