"The Rebel Flesh" is the fifth episode of the sixth series of the British science fiction television series Doctor Who, which was first broadcast on 21 May 2011 on BBC One and on BBC America in the United States. It is the first episode of a two-part story written by Matthew Graham and directed by Julian Simpson, concluded in "The Almost People". In the episode, the TARDIS is hit by a solar storm, sending the Doctor (Matt Smith) and his companions Amy Pond (Karen Gillan) and Rory Williams (Arthur Darvill) to a monastery on an island on Earth in the 22nd century, which has been converted into a factory to pump acid off the island. To prevent death from the acid, the workers have utilised a "programmable matter" called the Flesh, which creates a doppelgänger (called "Ganger") controlled by the worker. As the solar storm hits, the Gangers become independent, and the Doctor, Amy and Rory must work to prevent the two groups from breaking into a war. Showrunner Steven Moffat specifically asked Graham to write the episodes about "avatars that rebel", although the Flesh and the monastery were Graham's original ideas. The episode was filmed in the late months of 2010 with some location filming at Caerphilly Castle and Cardiff Castle to represent the monastery. Prosthetics were used to create the Gangers' facial features, while doubles of the actors were used for scenes in which a character and their Ganger were both in a scene, but did not both show their face. The episode was seen by 7.35 million viewers in the UK and achieved an Appreciation Index of 85. Reviewers were generally positive about the episode; some praised the setting and characters but others commented that the story had not developed enough even though it was only the first part. The computer-generated effects used for one scene were also disapproved of by a couple of reviewers. Plot Synopsis The TARDIS is caught in the first waves of a "solar tsunami" and materialises on Earth in the 22nd century. The Eleventh Doctor, Amy and Rory find themselves on a remote island, where a factory housed in a former 13th century castle monastery pumps a valuable, highly corrosive acid to the mainland. The skeleton crew of the factory uses a self-replicating fluid called the Flesh from which they create doppelgängers of themselves, colloquially called "Gangers". The crew control the Gangers