Virgil Earp was a 19th century law officer in Earth's Ancient West and older brother to Wyatt and Morgan Earp. He fought alongside his brothers and Doc Holliday against members of the Clanton-McLowery gang in the infamous gunfight at the OK Corral in Tombstone, Arizona on October 26th, 1881. This brief feud ended with the deaths of Frank and Tom McLowery and Billy Clanton.
In 2268, the Melkot created a replica of Virgil Earp as part of a bizarre, inaccurate depiction of the events leading to the gunfight. This illusion was intended to lead to the execution of Captain James T. Kirk and his landing party, who were placed in the roles of the Clantons and McLowerys. Kirk and crew were able to outsmart their would-be killers, and Kirk's non-violent resolution persuaded the Melkot to open diplomatic relations with the United Federation of Planets. (TOS: "Spectre of the Gun")