Jasper and Clarke rendezvous with the others and tell them about what is happening with Raven. Jasper explains that before ALIE took her over, Raven was planning to use a wristband to shortcircuit the chip and free herself from ALIE's control. Raven tries to escape and they realize that they cannot allow Raven to see her surroundings, because if she realizes where she is, ALIE will know and will come to find them.
Clarke leads the group to Niylah's home, knowing Niylah has a wristband that they can use. Niylah is hostile when they get there, revealing that her father was one of the soldiers that Pike's army massacred. She refuses them entry but Bellamy holds her at gunpoint and she relents. Monty notes that if his mother was taken by ALIE, ALIE will know where Niylah's house is. Therefore, Raven cannot see Niylah, because that will clue ALIE in as to where they are.
Raven struggles to escape her bonds, taunting everyone (particularly Clarke, Jasper, and Bellamy) and trying to goad them into messing up and releasing her so she can figure out where she is or to get the second AI chip from Clarke, which ALIE desperately wants.
Sinclair works on reworking the wristband to save Raven, while Monty and Octavia go to the dropship to retrieve a battery strong enough to power it. At the dropship, Monty is approached by his mother, who suddenly attacks him and tries to force him to ingest the ALIE chip. Octavia intervenes and Monty is forced to fatally shoot his mother to prevent her from killing Octavia. They return to Niylah's home.
Meanwhile, back at Niylah's, Raven loudly taunts Bellamy for his actions, allowing Niylah to overhear from the other room that Bellamy was part of the group that killed the Grounder army (specifically, her father). She runs in and attacks him, revealing to Raven (and by extension ALIE) where Raven is being held. The group realizes what has happened and that ALIE's followers are on their way.
The group restrains Raven and prepares to run the device on her. ALIE notes that their equipment is good and realizes that she'll have to kill Raven, because she won't be able to get to her in time before they disconnect her and she can't allow a disconnected Raven to spill her secrets.
Raven begins trying to smash her head open. Clarke distracts ALIE/Raven by holding up the second AI and offering to give it to her. They're able to restrain Raven and run the device to deactivate the chip. The device doesn't work because the battery is too weak, so they replace it with the battery from the rover. They run the device and Raven falls unconscious.
Jasper angrily threatens to destroy the second AI in retribution for what ALIE's done to Raven. Clarke stops him and suddenly realizes that the two AIs are probably similar and that she can cut Raven's AI out of her neck, She does so, and the destroyed remains of the chip ooze out of Raven's neck. She awakens, free from ALIE.
Monty realizes, after Raven is saved, that he could have saved his own mother. Upset and angry, he storms out of Niylah's home. The group packs up and prepares to leave. Clarke apologizes to Niylah for not telling her about Bellamy and warns her that she needs to leave her home because ALIE and her followers are on their way. Niylah agrees to run.
As they are preparing to leave, Clarke asks Raven why ALIE tried to get her to kill herself. Raven reveals that it was because she knows that the second AI is the only thing that can stop ALIE. Octavia suggests that they ban together and stop her. Everyone silently nods in agreement.
In the City of Light, ALIE informs Jaha that they'll have to kill Raven, Clarke, Bellamy, and the rest because, with Raven's abilities, she'll be able to understand what she learned in the City of Light and use the second AI to defeat ALIE.