On an island on Earth, three people in suits enter a facility and make their way to a room containing a vat of acid. The woman, Jennifer, checks the readings and notes that the levels have decreased during the last quarter. One of the men, Buzzer, is balanced on the edge and Jennifer accidentally knocks him into the acid. As Buzzer starts to dissolve, the third person, Jimmy, complains that he’ll have to spend time filling out forms for the suit. Jennifer and Jimmy casually leave as Buzzer dissolves into the liquid. As they go, Jennifer warns that the potency stats are too low. Buzzer, now in civilian garb, meets them and blames Jennifer for knocking him into the acid. They dismiss his complaints and leave, while Buzzer insists that no one was hurt.
In the TARDIS control room, Rory and Amy are playing darts while the Doctor secretly checks on Amy and still gets the same alternating readings that she and isn’t pregnant at the same time. He then offers to drop them off for fish and chips, but they insist on staying with him. Amy figures that the Doctor is up to something and wants to know what it is. However, before the Doctor can answer, the TARDIS is swept up in a solar storm. The Doctor manages to break them out of it on Earth. They emerge and discover themselves near what appears to be a monastery. However, they can hear Dusty Springfield playing. The Doctor finds recently-created fissures that reveal pipes of corrosive acid.
The trio enters the monastery and the Doctor comments that they’re back, and Amy wonders if they really came there by accident. The Doctor hastily assures her that it was an accident, and Rory burns his hand on some weakened acid leaking from nearby pipes. An intruder alert goes off and the Doctor says that “almost people” are coming to get them. They run into a building and find Buzzer and the others, all mounted on harnesses and apparently unconscious. However, Buzzer, Jennifer, and Jimmy then come in and take them captive. Amy wonders if they’re twins to the people on the racks, and the group’s leader, Cleaves, comes in and informs the travelers that they’re intruding in an alpha-grade industrial facility. The Doctor flashes his psychic paper and claims to be with an inspection department. He warns that a second solar wave is on the way and they barely survived the first one. Cleaves has her assistant, Dicken, scan the trio for bugs, while the Doctor realizes that they’re a 22nd century army-owned factory. Cleaves explains that they’re contractors. Once Dicken confirms that they’re clean, the Doctor asks to see their critical system, and says that Cleaves knows which one.
Cleaves takes the travelers to a vat containing the Flesh, fully programmable matter that is learning to replicate itself. They can manipulate its living structure into anything, including voice, hair, and clothes. Rory realizes that all of them except Jennifer are Flesh doppelgangers, while their real selves control their counterparts via the harnesses. The Doctor points out that life grows, but Cleaves dismisses his concern and tells them that the acid was so dangerous that they were losing a worker a week, so now they use “Gangers.” If a Ganger dies, the pain receptors cut off and the human host simply gets a new Ganger. Cleaves sends Jennifer back to her harness to man a Ganger, while the Doctor scans the Flesh. Suddenly there’s a reaction and he discovers that the Flesh is scanning him. He puts his hand atop the Flesh, ignoring Cleaves’ warning, and then breaks free. Cleaves tells him not to disrupt the process, but the Doctor tells her that the Flesh is alive and conscious, and contains all their thoughts and memories. The second solar storm hits but Cleaves tells her crew to keep passing acid until the mainland tells them to stop.
Jennifer confirms her ID and enters her harness. Meanwhile, Cleaves shows the Doctor, Amy, and Rory a vat that is filling with Flesh. As they watch, it takes the shape of Jennifer, clothes and all. Its half-shaped features snap into a full duplication after a second, and the Ganger Jennifer says they need to go to work. The Doctor says that they need to leave because of the solar storm and offers to get them all off of it. An alarm goes off and the Doctor realizes that they draw energy from solar power. He pulls Cleaves to the side and warns that she’s making a mistake, and they’re in terrible danger if they don’t prepare for the storm. Cleaves insists that they’ll follow her rules, and the Doctor goes to the monitoring station to check the progress of the storm.
In the monitoring room, the Doctor explains to Amy and Rory that when the solar storm hits, the resulting power surge will blow out the factory. He goes to the cockerel to stop the overload.
In the control chamber, the Gangers watch their human counterparts. Meanwhile, acid leaks from pipes throughout the factory, including some that puddles on the ground beneath the TARDIS.
The Doctor climbs up to the cockerel and tries to shut down the power, but a lightning bolt hits the circuit box, knocking him to the ground. In the control chamber, the Gangers scream as they begin to melt and the power goes out in a massive overload.
The Doctor wakes up shortly thereafter and watches as the storm dissipates. In the monitoring room, Rory and Amy wake up. Meanwhile, the Doctor finds Cleaves, who admits that he was right and that she abandoned her team. As they search, the Doctor suggests that they were unconscious much longer than a minute, as much as an hour, and warns that things can go horribly wrong in an hour.
Amy and Rory find the others in the control room and confirm that Jimmy, Buzzer, and Dicken are okay. Jennifer is overwhelmed with pain and explains that she was trapped in her harness. Rory comforts her while Amy looks on. The Doctor and Cleaves arrive and Amy wonders what happened to the Gangers. Cleaves tells them that when the links shut down, the Gangers revert to pure Flesh. However, as they talk, the record comes back on and they realize that the Gangers are active despite Cleaves’ insistence that it’s impossible.
The group goes to the dining hall and discovers that the Gangers have gone through their belongings. The Doctor explains that the Gangers came there to find confirmation that their memories are real, and they are compelled to reconnect to their lives. Buzzer reminds them of a story of a Ganger that went berserk and killed its human source, while Jimmy points out that the Gangers can’t remain stable without the humans plugged in. The Doctor isn’t convinced, and Cleaves admits that she isn’t sure.
Jennifer feels ill and goes to the washroom, and Rory follows her. She asks for a minute alone and he turns around, and Jennifer then vomits up a gob of Flesh into the sink. Jennifer retreats into a stall and Rory, hearing her sob, goes in after her. An elongated arm smashes a hole in the door and punches him, and then Jennifer’s head on an elongated neck emerges. The Ganger tells Rory to let them live, and he runs out of the room.
In the dining hall, Jimmy says they need to prepare for the worst, and the Doctor notes that if Jimmy isn’t a violent man, than his Ganger shouldn’t be either. He then returns to the issue of how long they were out and asks Amy who was in harness. Amy reports that Jimmy and Dicken were helping Buzzer out, and Jennifer was already out when they arrived. Meanwhile, the Doctor prepares some food and hands a hot plate to Cleaves. She doesn’t realize that it’s hot until he says that it is, and the Doctor concludes that the nerve endings in the Flesh matter haven’t fused properly yet. Cleaves rejects his insinuation that she’s a Ganger and turns away, but the Doctor asks her to trust him. She spins around, revealing the partial features of a Ganger. The Doctor explains that she can’t stabilize between half-form and full-form, and the Ganger says that they are leaving and runs screaming out of the room. Amy reminds the Doctor about Rory. They go to look for him but discover that the acid is leaking, cutting them off.
Rory makes his way through the monastery and finds his path cut off by another stream of acid. He hears Jennifer calling out to him and hides.
The Doctor, Amy, and Jimmy go to the restroom and find the hole in the stall door, and the Doctor warns that the Gangers are scared and angry. They realize that the Doctor knows something about the Flesh, and the Doctor says he needs to talk to the Gangers and fix the situation. They try searching and narrowly avoid another acid leak, and the Doctor tells Jimmy and Amy to go back to the dining hall while he returns to the TARDIS and use its scanners to find Rory and Jennifer. Once the Doctor leaves, Jimmy retrieves some distress flares and bumps into the Doctor, who has returned to ask for directions. Once he leaves, Amy follows after him despite the risk.
Buzzer and Dicken go to get acid suits.
Rory finds the Jennifer Ganger sitting in her quarters. She explains that when she was child, she got lost and imagined another Jennifer, a tough Jennifer that would lead her home. The Jennifer Ganger considers a photo of Jennifer as a child and looks at herself in a hand mirror, and insists that she is Jennifer, not a factory part. When Rory asks her where the real Jennifer is, the Ganger insists that it is the real Jennifer and remembers everything in Jennifer’s life. As she starts crying, she becomes fully-formed and begs Rory to help her.
The Doctor goes to the vat chamber and scans the Flesh. Once he leaves, a pair of lips form in the Flesh and a voice says, “Trust me.” Outside, the Doctor finds the TARDIS mostly sunk into the ground and discovers that he’s standing in a small puddle of acid that burns his shoes. He quickly abandons them and goes back into the monastery.
Buzzer and Dicken discover that the Gangers have taken the acid suits. Dicken warns that whatever the Gangers are now, they’re not them.
The Ganger Cleaves enters one of the chambers and meets with the Gangers of Dicken, Jimmy, and Buzzer. She tells them that now that they have the acid suits, they have the advantage and can strike at will.
As they head back, the Jennifer Ganger says that she feels stronger now. Rory assures her that the Doctor wants to help them, and she thanks Rory for using her name. As they continue, they are unaware that the real Cleaves is watching them from the shadows.
Amy continues searching for Rory and enters a chamber. She catches a glimpse of the Eye Patch Lady watching her from an eyeslot, and then the slot closes. Retreating, Amy finds Rory and the Jennifer Ganger, and Rory insists that the Ganger needs protection. Buzzer and Dicken arrive and Rory insists that no one touches the Ganger.
The Doctor returns to the vat chamber and finds Cleaves and the other Gangers waiting for him. He suggests that they work together and they agree. As they leave, the real Cleaves watches them, but the Ganger Cleaves seems to realize she’s behind them.
In the dining hall, the crewmen interrogate the Ganger Jennifer and ask where the real one is. The Ganger insists that she’s just like their Jennifer. Amy questions Rory’s faith in the Ganger, and he says that she’s afraid and needs their help. The Doctor arrives with the other Gangers and then asks for a pair of replacement shoes.
The real Cleaves goes to her locker to find a piece of equipment, believing the Doctor has betrayed them to the Gangers.
Once he has a pair of shoes, the Doctor explains that the storm has hardwired the personalities of the Gangers, and there is no “accident” to be fixed or mopped up. He offers to get them to the mainland in the TARDIS, and Jimmy is eager to be reunited with his son. Jimmy is shocked when his ganger has the same memories of the birth of “his” son. The Doctor says that they can resolve matters once everyone is safe. Jimmy goes to find Cleaves and his Ganger offers to help. As Jimmy gratefully accepts, Cleaves arrives with a circuit probe capable of generating 40,000 volts. She insists that the Gangers are monsters, and the Ganger Cleaves says that her counterpart’s attitude is typical. The Ganger Buzzer tries to stop the real Cleaves and she kills him. The Doctor angrily assist that it was alive, and she killed it. The Ganger Jennifer starts to revert and she flees with the remaining Gangers, while Rory jumps Cleaves. He manages to disable the circuit probe, but the Gangers make good their escape. Cleaves insists that it’s war now. Dicken agrees and after a moment, Jimmy agrees as well.
The Gangers retreat to the vat chamber and Jennifer rallies her fellows, saying it’s us or them and it’s war now. The Ganger Cleaves is hesitant, but Jennifer says she’ll dispose of her “spare” and leaves. The Ganger Jimmy and Dicken don the acid suits.
The real Jennifer goes to the Ganger generation room. A hideous distorted voice from the shadows says, “Trust me” and Jennifer flees in terror.
In the dining hall, the Doctor confirms that the chapel is the most easily defensible room in the monastery. He warns Cleaves that now that she has killed, the Gangers will strike back in a big way.
The Ganger Cleaves, Jimmy, and Dicken don the protective suits and march though the monastery. The real Jennifer watches them from the shadows and then hears Rory call to her. She follows his voice, unaware that her Ganger is clinging to the ceiling.
As the Doctor and the others enter the chamber, they hear Jennifer scream. Rory hesitates and the Gangers arrive. He’s forced to run off, and the Doctor grabs Amy and pulls her into the chapel and then seals the door. Inside, they realize that someone is in the chapel with them. While the others barricade the door, the Doctor calls on the person inside with them to reveal themselves. As Amy says that they’re in danger, the intruder steps out and says that they can work things out. It’s a Ganger of the Doctor, who asks her to trust him.