The Doctor and his companions arrive at old Wild West town called Mercy where attempt to blend in with the inhabitants doesn't go to plan. The Doctor reveals himself to be an alien and a Doctor, both of which cause the towns people to carry the Doctor to the edge of the town and deposit him on the other side of the city boundaries. The boundaries are marked by a line of rocks. An alien gunslinger appears and approaches the Doctor. Sheriff Isaac arrives and pulls the Doctor into the town to save his life.
Sheriff Isaac is played by sci-fi veteran Ben Browder who is best remembered for playing John Crichton, the lost astronaut in the sci-fi series, Farscape and then Lt. Col. Cameron Mitchell in Stargate SG1.
Isaac reveals the truth about the alien doctor called Kahler-Mas that the Sheriff has locked up in a cell in the prison jail. Kahler-Mas cured disease and introduced technology to the town many years before it would have been invented normally. The Doctor had noticed the out of place technology earlier and wondered what it was about.
The Doctor using Isaac and Rory Williams as a diversion goes off into the countryside to find the alien space ship and break into it. The alien ship looks like a giant egg but the shape doesn't prevent the Doctor from breaking in. The Doctor deactivates the self-destruct mechanism of the alien ship and looks through the archives and doesn't like what he sees.
On returning to Mercy, the Doctor takes Kahler-Mas to the city boundaries and throws him over the edge. Amy Pond pleads with the Doctor that he shouldn't be doing this. The gunslinger approaches but before the Gunslinger is able to shoot the alien doctor, Isaac pushes Kahler-Mas aside and Isaac is killed. The Doctor is given the role of Sheriff. The Doctor demands an end and the Gunslinger agrees, the Gunslinger gives the town until noon tomorrow to hand over the alien Doctor otherwise he'll come in force and ignore the boundary.
During the night, the townspeople comes to the Jail and demand that Kahler-Mas is handed over to the Gunslinger but the Doctor disagrees.
The Doctor confronts the townspeople whilst Kahler-Mas makes an escape. Khaler-Mas makes it to his alien space ship and causes the space ship to self-destruct in an act of suicide. The Gunslinger stands down and later on becomes the new Sheriff of the town.