In 19th Century America in the frontier town of Tombstone, Arizona, the troublesome Clanton brothers, Ike, Phineas and Billy, are in town in search of Doc Holliday to settle an old score over the death of another brother called Reuben. They meet up with their hired hand Seth Harper at the Last Chance Saloon. He knows what Holliday looks like and describes his coat and demeanour. This is overheard by bar singer Kate, who lets her paramour Holliday know he is in danger.
The TARDIS has arrived in a nearby stable, with the Doctor in agony from toothache. He and his companions Steven Taylor and Dodo Chaplet, dressed as cowboys, soon encounter local marshal Wyatt Earp, who offers them his protection and warns them to keep their counsel. The Doctor finds the dentist – Holliday himself - while Dodo and Steven book rooms at the local hotel. There they are mocked by the Clantons, who suspect the Doctor they refer to is Holliday himself. Seth Harper is sent to the dentist’s surgery and invites the Doctor, tooth removed, to the hotel in five minutes to meet his friends. Holliday is initially happy to let him be shot in his place, allowing the real Doc to disappear, but Kate intervenes to ensure the Doctor survives. This buys some time until Holliday relents and hides in an upstairs chamber of the hotel, firing his gun at appropriate moments to con the Clantons into thinking the Doctor is indeed Holliday the sharpshooter. Soon afterward Wyatt Earp and Sheriff Bat Masterson arrive and break up the fracas, taking the Doctor into custody for his own protection. Steven now becomes embroiled in a plot to smuggle the Doctor a gun to help free him from the jailhouse, but the Doctor refuses to be armed. Steven is shortly afterward confronted by a rabble wound up by the Clantons, who are intent on lynching him as an associate of the disreputable Holliday. Once more it is Earp and Masterson who defuse the situation, and also take Phin Clanton into custody to ensure the co-operation of his brothers. The Doctor and Steven are freed and told to leave town as soon as possible.
Dodo has meanwhile fallen in with Kate and Doc, who both plan to leave town and take her with them. When Seth Harper stumbles across their escape plans, Holliday kills him, and the trio then depart. Harper's role as aide to the Clantons is soon replaced by a new arrival, Johnny Ringo, who shoots local barman Charlie by way of an introduction to the town of Tombstone. The Doctor and Steven return to the Last Chance Saloon in search of Dodo and encounter the dangerous Ringo.
Wyatt Earp’s brothers Warren and Virgil have meanwhile arrived at Tombstone to help him enforce the law. The Doctor soon tells them that Ringo is in town. Events take a harsh turn when the other Clanton brothers visit the jail to free Phin, killing Warren Earp in the process.
Meanwhile Steven heads out of town to look for Dodo with Ringo in tow in search of Holliday. Steven and Kate end up being taken by Ringo to the Clanton ranch where the Clantons recamp and tell their father, Pa Clanton, that they have killed an Earp. Wyatt Earp swears vengeance and starts to build a posse of lawmen to deal with the Clantons once and for all. Doc Holliday returns to Tombstone with Dodo, and offers his services to his old friend Earp too. Attempts by the Doctor to defuse the situation amount to little: there will be a gunfight at the O.K. Corral. On the one side are the three Clanton brothers and Johnny Ringo; on the other, the two Earps and Doc Holliday. At the end of the gunfight Ringo and the three Clantons are shot dead. Shortly thereafter, the Doctor, Steven and Dodo slip away in the TARDIS.
They arrive on a strange planet, and decide to go out and have a look. As they leave, a strange man is seen approaching the TARDIS on the scanner.