Melkotian gunfight test

Kirk's crew forced to replay the O.K. Corral

After ignoring a warning buoy, Kirk's landing party was placed by the Melkotians in a recreation of Tombstone, Arizona, and made to face the Earps at the O.K. Corral.

In 2268 the Enterprise was ordered to contact the Melkotians and passed a buoy warning it away. The Melkotians sentenced Kirk, Spock, McCoy, Scott and Chekov to die in a partial recreation of Tombstone in 1881, taken from Kirk's memory, in which the landing party were cast as the Clanton gang, who historically lost the gunfight at the O.K. Corral.
Chekov was shot early on. Spock realized the setting was an illusion and that the bullets could only kill if the men believed in them, and he used mind-melds to convince the others. They survived the gunfight, and Kirk refused to kill Wyatt Earp. Impressed, the Melkotians agreed to peaceful contact.