October, 8:00 pm. Torchwood responds to an alien energy spike in the heart of Cardiff; Tosh has been tracking the energy signature for some time, but it has abruptly escalated into what team member James Mayer calls the End of the World, or a 26 on a scale of 1 to 10. People are stumbling through the streets near the river, speaking of abstract numbers and shining blue lights, spouting out stream-of-consciousness ramblings, and chanting "big big big." A young man named Huw dies of a seizure before Tosh's eyes, coughing out a puff of foul-smelling smoke. A tramp named James Norris tells Tosh that Huw lost the Amok, and then attacks her, claiming that it's his turn. Tosh fights him off, but is attacked by a burly man who also claims that it's his turn. Her fellow team members subdue her attacker, and Jack sorts through the tramp's rubbish collection and finds a geometric solid with too many dimensions to count. He manages to shake off the device's influence, but then finds himself and his team surrounded by a mob of men, women, and children, all demanding their turn.
The Torchwood team rush the Amok back to the containment box in their SUV, tossing it from person to person like a relay so that no one team member is exposed to it for too long. Just as James reaches the SUV, however, he is struck by a police car speeding to investigate the disturbance. Young PC Peter Picknall falls under the Amok's influence when he emerges from his car to check on James, but Owen overpowers him -- only to fall under its influence himself. When James tries to take the Amok from him, Owen points his gun at James, claiming that it's his turn. Meanwhile, the milling mob has nearly pushed Gwen into the river, and as Jack pulls her back to safety, they feel the Amok's influence cut out. By the time they reach the SUV, James has overpowered Owen and sealed the Amok in the containment box. The rest of the mob also returns to normal, dazed and unsure what's just happened to them.
Shiznay Uhma, a waitress at the Mughal Dynasty restaurant, has been developing a crush on her regular customer Mr Dine, although she can tell that there's something odd about him. Tonight, he suddenly stands up before his dinner is served, claiming that he's received a call to protect the Principal. Shiznay's father tries to stop him from leaving before he's paid, and Mr Dine flings him out of the way with a gesture and leaves the restaurant. Shiznay follows him outside, but there's no sign of him when she emerges from the restaurant -- but for a blur of movement an impossible distance away, which must surely have been her imagination... Mr Dine eventually dismisses the call as a false alarm, but he's expended too much energy investigating and must crash in the alley behind the restaurant to regain his strength. When Shiznay finds him there later, he apologises for harming her father, and repays his debt by handing over 18 perfect diamonds that he claims to have created by compressing the graphite in a pencil stub. Aware that he will no longer be welcome at the restaurant, he tells Shiznay to close her eyes; when she opens them again, he's disappeared, but she nevertheless tells the absent Mr Dine to return any time he wants.
Back at the Hub, Jack tears a strip off his team for their failure to protect now-traumatised innocent bystanders from the Amok. Gwen insists that they all did their best and storms out angrily on Jack, unaware that he's taking out his frustrations over something else. A device that he was given when he first joined Torchwood activated itself about six weeks ago, and he still has no idea what it's telling him. Meanwhile, Owen declares the rest of the team medically fit, though still dazed by their exposure to the Amok; for his part, he can't even remember how James overpowered him. As the puzzled Ianto disposes of Owen's ruined gun, James invites his friends round to his falt for a marathon video session of the lost season of Andy Pinkus, Rhamphorhynchus. Gwen would love to spend more time with James, but she begs off, as she and Rhys already have plans to see Pirates of the Caribbean 3. But when she gets home, she brushes off Rhys' questions about why she's late and bruised, and he angrily accuses her of using her work as an excuse to stop talking to him. The argument develops into a blazing row, and Gwen storms out on him -- and ends up at James' flat, where they fall into each other's arms.
Elsewhere in the city, an elderly war vet, Davey "Taff" Morgan, has unearthed something odd from the abandoned plot next to his vegetable allotment. He's been keeping it in his shed while he decides what to do with it, and he eventually decides to take it back to his house. On the way, he is taunted and bullied by a group of young hooligans. That night, he dreams about the war, and then has even worse nightmares about stick figures stalking the landscape of a far more terrible conflict. When he wakes, he realises that he was sharing the dreams of the thing from the shed, and as they're too much for him to handle, he apologises to the thing and wheels it back to the shed. He stops off at the library for a book on modern art before he returns home; the youths are waiting for him again, but he drives them off with a bayonet that he kept from the War. Once he's alone, he looks through the book and confirms his impression that the figures in his dream reminded him of an exhibition his wife had taken him to in 1969 -- an exhibition of articulated humanoid figures sculpted from metal wire.
Toshiko seals the Amok behind a physical firewall of force fields, but she and Owen are still suffering from mild headaches due to its influence. James quietly returns Gwen's MP3 player, which she forgot in his flat, and tells her that he's loaded his favourite pop songs onto it. Jack apologises to his team for dressing them down more harshly than he'd intended; he too must have been affected by the Amok, which he's realised is a multi-dimensional alien mind game like a word search or a sudoku. It's a mild diversion for those who created it, but is too complex for the human mind to handle. The team is then called out to deal with a Droon infestation; these migratory alien insects usually pass as nothing worse than a mild cold, but this time they're about to hatch inside the bodies of an elderly couple, the Peeters. Torchwood gets in, zaps the Peeters unconscious with infrasonic paddles, and extracts the alien pupae from their sinus cavities before the pupae can hatch into lethal insects. Mission accomplished, they then provide the Peeters with rehydrating drinks that contain a low-level dose of the Torchwood amnesia drug. Gwen points out to Jack that his team dealt with the problem quickly and efficiently, but he still doesn't tell her why he's been so uptight lately, repeating only that he has secrets he will only divulge if he feels she needs to know them.
That night, Tosh and Owen notice that Gwen and James are going "home" together, but don't call attention to it. Gwen's relationship with James is becoming serious, and she realises that she'll have to break up with Rhys if she intends it to continue; however, she doesn't know to do so without hurting him. The next day, she pops back home to pick up some of her belongings while Rhys is out, but he's taken the day off for a dentist's appointment and returns unexpectedly. She insists that she's not leaving him and that she just needs some time alone to think, but the confrontation upsets her. James, waiting for her outside, tells her that he's willing to give her all the time she needs to make up her mind -- but that she's going to have to deal with Rhys sooner or later.
Tosh arrives at work late with a mild headache, and discovers that the Amok, which still wants to play, is trying to break out of its force-field cage. However, she has to put this aside for later when Jack asks her to help with another problem: the church of St-Mary's-in-the-Dust has reappeared in Butetown, the heart of old industrial Cardiff. The church was demolished in 1840, but has periodically reappeared ever since. Jack always meant to find out why, and now the opportunity has arisen -- oddly, since its next appearance wasn't due until 2011. Gwen and James arrive later and follow Jack and Tosh out to the site, but find no sign of the church -- or of Jack and Tosh. After searching fruitlessly for half an hour, Gwen finally manages to get through to Jack on her cell phone -- and discovers that he and Tosh are standing in the same place as her, albeit in front of the church.
Back at the Hub, Owen stumbles in late with a splitting headache, having woken to find that he'd written "big big big" in lipstick on his bathroom mirror. Somewhat dazed, he sits down at Tosh's workstation instead of his own, and before Ianto realises what he's doing, Owen has lowered the physical firewalls around the Amok. Out in Butetown, Gwen and James feel the Amok beginning to tug at their minds again -- and Jack and Tosh retreat into the church, sensing something malignant approaching from outside. As something large and terrible approaches the church and begins to draw the life out of Jack and Tosh's bodies, Jack begins to panic and tells Gwen to take care of Torchwood when he's gone. He stumbles over his words while speaking to her, however, and she realises that he too is being affected by the Amok; she thus urges him to give in to the pull and let it draw him and Tosh back to the real world. They do so, escaping from the terrible thing that's waiting for them outside the church -- something Jack never wants to speak about ever again. However, once he and Tosh are back in reality, the influence of the Amok becomes too much and he and Tosh collapse alongside the convulsing James and Gwen.
Mr Dine feels the call once again, but the activation protocols are contradictory, as if he's being called to answer two threats at once. Confused, he steps out into the street and is struck by a van; he survives without a scratch, but the van is totalled. Mr Dine pushes his way through the gawking crowd at top speed, and decides to deal with the closest threat, which is located beneath the water tower in Roald Dahl Plass. He locates the invisible lift, enters the Hub, and finds Owen and Ianto lying unconscious near the Amok. Mr Dine identifies himself as one of the First Senior and plays one round of the Amok's game with it; however, it demands more, and when it tries to force itself through his mental barriers, he grabs it and crushes it in his bare hands. Owen recovers briefly once the Amok has been destroyed, but Mr Dine orders him to forget what he's seen, and Owen is too weak to argue.
The others return to the Hub, where Owen declares everyone ill but fit to return to work. Jack, shaken by his experiences in the pocket of reality, thanks Gwen for keeping it together and apologises, sincerely this time, for his outburst the last time they encountered the Amok. Obviously, it was much stronger than they'd imagined at the time -- which begs the question, why did it release its grip on their minds, and what happened to it? The Hub's security systems are showing some suspicious blanks, which might have been caused by the Amok -- or by something else that got into the Hub and destroyed the Amok. Acknowledging that he won't be around all the time, Jack finally shows the others the device that's been causing him such worry recently. It was handed down from family to family in the Cardiff area until 1899, when Colonel Cosley of Cosley Hall passed it on to Torchwood. According to the records, it's meant to warn mankind of some terrible threat -- and six weeks ago, it became active. Either something's on its way, or it's already here and they don't know what it is.
The effects of the Amok seem to wear off by the next day, although James has been having odd dreams and at one point thinks he sees his eyes change colour. It's a quiet day, so Jack assigns Gwen to catch up on paperwork, turning down her request to visit Cosley Hall on the grounds that he's already investigated it and found nothing odd. Tosh then finds that there have been a number of police complaints about an odd door-to-door salesman; the homeowners who have encountered him are unable to describe him afterwards, but once he's gone, they find that they've forked over large amounts of cash for loft insulation and double-glazing that they don't need. Jack reasons that whatever the man is using must have a low range in order for it to slip under Torchwood's radar, which implies that the man must superficially resemble a real salesman in order for him to get close enough to his victims. He and James head out to the area in question to investigate, and spot a suspicious character who flees when they try to confront him. James somehow manages to catch up with the suspect despite the man's thirty-yard lead, but the man turns out to be a would-be burglar who was pretending to conduct customer surveys in order to case the houses on the street. Two other men flee when confronted, but the second man is a window cleaner who's been having an affair with a housewife, and the third is a Jehovah's Witness who fears that he's going to be mugged.
Frustrated, Jack and James return to Torchwood and call it a night. Gwen has been staying at James' flat for six days now, and it's becoming increasingly obvious that she'll have to have a talk with Rhys. She asks James where their relationship is going, telling him that she doesn't want to hurt Rhys unnecessarily -- but that she will if she knows this is more than just a casual fling. James admits that he's fallen in love with her, and they return to his flat and make love. All seems well with the world, but that night, James has another weird dream about running away from a castle across an impossibly long bridge while being pursued by two shadowy figures that he can't outrun...
The next day, Gwen accompaies James and Jack on their stakeout, and when she suggests buying an ice-cream from a passing van, it occurs to Jack to wonder why an ice-cream van is driving around on a chilly day when the neighbourhood children are in school. They investigate, and Gwen catches the van's driver, a young con man named Dean Simms, using the weird thing in his briefcase to hypnotise an unfortunate housewife. Gwen confronts Dean before he can start his sales pitch, but he uses the thing on her, and she forgets what she was doing and wanders off. Dean tries the same trick on James, and flees in panic when it doesn't work. James and Jack pursue Dean to a mini-mart, but Dean manages to use the thing on Jack, who also forgets what he's doing. James blocks the mini-mart's exit, and the desperate Dean pushes a heavy trolley laden with beer crates at him. James angrily flings the trolley the length of the store and tackles Dean, knocking him out and seizing the weird organic alien bladder that he's been using to hypnotise people. When Gwen finally arrives at the store and sees the broken trolley, James claims that it fell over of its own accord -- but privately, he's scared.
Owen has already tried and failed to get through to Jack during the chase, and once Dean has been subdued, Jack answers the call and learns that Tosh has picked up an alien energy transmission from elsewhere in Cardiff. Owen and Toshiko trace the signal to Davey Morgan's house, and the old vet assumes that they've come from the Ministry of Defence in answer to his call. He believes that the thing he found in the allotments is a smart weapon designed by the military, and he feels a bond with it, as they're both old soldiers with terrible memories of war. But last night, the young hooligans who have been bullying Davey tried to vandalise his shed -- and when he arrived the next morning, he found bits and pieces of their bodies scattered over the allotment. Davey has taken the thing back to his house while he tries to figure out what to do, but when Owen confronts it, the thing perceives him as a threat. Jack, Gwen and James arrive just in time to see a massive explosion take out the front of Davey Morgan's house -- and elsewhere, Mr Dine receives another activation signal...
Owen, Tosh and Davey manage to duck out of the way of the blast, and when Jack arrives, he's horrified to recognise their attacker as a Melkene Serial G soldier robot. Faced with defeat in a long and vicious war, the desperate Melkene panicked and created a line of warrior robots with no mercy, psychotic killers willing to commit any atrocity in order to win. After the war, the shamed Melkene tried to recall the line, and were extinct within six weeks. Jack orders Tosh to have Ianto fetch Catalogue Item 981 from the Archive while he and the others try to keep the Serial G contained; however, the robot is far too powerful for them to handle. James tries to distract the robot to prevent it from going after Jack, and ends up running for his life -- so fast that he later realises he's somehow scaled a seven-foot-high wall without noticing. Just as the Serial G is about to catch him, however, it recoils as if something is giving it the beating of its life. Something is: Mr Dine, who is now in full combat mode and has become a thorn-covered, grey humanoid figure.
At first, the somewhat unworldly Davey Morgan is the only one who can see the creature attacking the Serial G, but as Mr Dine expends more energy, he becomes visible to all those watching the fight. Eventually, Mr Dine manages to rip out the Serial G's CPU, and the robot's mini-reactor power source promptly explodes, taking out the house they've just crashed into and seriously injuring Mr Dine. Jack offers to help, but Mr Dine refuses, claiming that such contact is not permitted. Instead, he flees back to the familiar Mughal Dynasty restaurant and crashes in the pantry. Shiznay finds him there, and, realising that Mr Dine is badly injured and needs to rest, she sneaks him into her brother Kamil's bedroom while Kamil is out of town visiting friends. Later, she secretly brings him dinner, but finds someone else in the room -- a stranger named Mr Lowe. Mr Dine stops Mr Lowe from harming Shiznay, and instead tells her to forget that any of this has happened, which she immediately does. Mr Lowe then informs the recovering Mr Dine that he's been inserted to provide Mr Dine with support, but Mr Dine realises that Mr Lowe hasn't been here long enough to appreciate the subtleties of human culture...
While James recovers from his surprisingly superficial injuries in Torchwood's care room, Jack conducts a post-mortem of the incident. The device that he was so worried about is still active, which means that even the Serial G wasn't the threat it's warning them about. Perhaps the real threat is whatever managed to take down a Serial G with its bare hands. Gwen points out that since the device's condition has changed, then maybe conditions have also changed up at Cosley Hall; Jack concedes that this is a good point, and Gwen and Tosh set off to the Hall to look for clues. The Hall's curator, Mr Beaven, is pleased that they've taken an interest in the historical site, and tells them that its last owner, Colonel Joseph Penington Cosley, regarded himself as a border prince, a guardian of the threshold between two lands. There is no evidence of alien influence at the Hall, but Mr Beaven gives Gwen contact information for Brian Brady, a student from Manchester who's been studying Colonel Cosley's personal papers and diaries.
James recovers quickly from his encounter with the Serial G -- perhaps too quickly. Still haunted by dreams of being chased away from a castle, and convinced that he somehow jumped over a seven-foot-high wall and threw a fifty-kilogram shopping cart the length of a mini-mart, James privately asks Owen to conduct thorough tests to determine whether something's wrong with him. Owen does so, and confirms that James is thoroughly human; presumably, he was just imagining things in the heat of the moment. As the relieved James departs, Jack confronts Owen and admits that he too has noticed something odd going on with James. Meanwhile, James and Gwen return to James' flat and spend an enjoyable evening watching a romantic comedy called Sisters in Law, starring Glenn Robbins -- the actress from James' favourite TV show, Eternity Base. Gwen is planning to break up with Rhys on the weekend, but Jack then calls her, telling her that the tile device has started to flash in a different pattern; he still doesn't know what it means, but he wants his team on full alert. Worried, Gwen postpones her discussion with Rhys, contacts Brian Brady and arranges to visit him in Manchester tomorrow to discuss the life of Colonel Cosley.
That night, James sees two shadowy figures watching the flat, and when he confronts them, they tell him that he is acting against the Principal's best interests. They refuse to explain further, and James then finds himself waking up back in the flat with no memory of the encounter. The next morning, Gwen sets off for Manchester by train, while James goes shopping, intending to cook a sumptuous dinner for himself and Gwen. However, he begins to feel oddly disconnected, as if his body is not his own, and as he begins to lose track of what he's doing in the shopping centre, he realises that two men are following them -- and remembers encountering them outside his flat last night. James flees from the shopping mall in a panic, smashing straight through the reinforced plate-glass windows at the entrance and crossing the busy road by leaping from roof to roof of the speeding cars. Mr Dine and Mr Lowe give chase, but while Mr Dine has some care for the people in his path, Mr Lowe simply shoves them aside so hard that some will require medical attention. James manages to shake off his pursuers by clinging to the side of a bus so hard that he leaves deep impressions in its metal side, and, panic-stricken, he calls his friends at Torchwood for help.
Jack, Owen, Toshiko and Ianto have been discussing James, and have realised that they have a problem. Jack has checked the CCTV footage from the mini-mart, and has confirmed that James somehow threw a heavy trolley an impossible distance across the store. Ianto has examined Owen's gun, which was ruined when James somehow overpowered him during the capture of the Amok, and has found James' fingerprints embedded in the crushed metal. Worried, Jack calls Gwen, who has been spending her trip to Manchester listening to James' songs on her MP3 player, reading a magazine article about Glenn Robbins and Eternity Base, and watching a child playing with his Andy Pinkus toy. As she nears Manchester, however, she begins to feel strange, and is overwhelmed by a sense of loss and grief. She doesn't understand where this has come from, why her MP3 player is full of songs she doesn't like, why she's been reading a magazine article about Jolene Blaylock and Star Trek: Enterprise, or why she's been watching a child playing with his Spongebob Squarepants toy. And when Jack contacts her to say that they need to talk about James, she has no idea who he's talking about.
The terrified James contacts Torchwood, and his friends rush to help him. Mr Dine and Mr Lowe have tracked him down, and they inform him that his investment has been compromised, putting the Principal at risk; his self-protection protocols have been damaged, and his base consciousness has not uploaded, as evidenced by the fact that he has no idea what they're talking about. Panic-stricken, he tries to flee, but they transform into their sleek, grey combat forms and chase him through the streets, just as they have done in his dreams. Jack, Tosh and Owen arrive on the scene, and Jack fires his Webley revolver at the two figures to attract their attention; he then lowers it, explaining that he just wants to talk. Mr Dine convinces Mr Lowe to wait while he explains the situation; unlike his new partner, Mr Dine has been here long enough to appreciate the nuances of human society, and he thus agrees to sit down with Jack and tell him everything.
Gwen returns to the Hub, shaken to realise that she forgot all about James once she got more than 100 miles away from him -- because the camouflage effect doesn't extend that far. Jack explains to the shocked James that, although his body is genuinely human, his memories are false; his identity was constructed to house the consciousness of the Principal of the First Senior. The Rift borders on a number of worlds besides Earth, and the First Senior are the alien equivalent of Torchwood, the border princes who guard the Rift on their world. Every so often, the heirs to the throne are sent through the Rift to immerse themselves in the cultures of the border worlds in order to better understand the things that might fall through the Rift. The false identity of James Mayer contains buried protocols intended to trigger superhuman strength and speed whenever he finds himself in danger -- but his identity protocols have somehow been damaged, and his true identity, which should have resurfaced by now, has not.
James refuses to accept this, and insists that his friends have been manipulated into believing a lie. Terrified, he flees from the Hub, but Mr Dine and Mr Lowe are waiting outside. James attacks Mr Lowe, injuring him, but Mr Dine realises that Mr Lowe will take offence and try to teach the Principal a harsh lesson in respect. He thus ends the matter quickly by reaching out and snapping James' neck, killing James' human body before he can react. Mr Dine and Mr Lowe then depart, taking the Principal's consciousness back with them -- and leaving James' dead body outside the Hub. Jack believes that, without the influence of the camouflage effect, the Torchwood team will slowly lose their memories of James and return to normal, but for now they'll have to cope with knowing that their friend is not only dead but never really existed. For the others, this will be hard enough -- but for Gwen, even though she's got Rhys to return to, it's the end of the world.