Tris, Caleb, their father, and Marcus jump on a train headed toward Dauntless headquarters. Marcus assumes Tris regrets joining Dauntless, but Tris retorts that the faction taught her how to be selfless. When they arrive, Tris shows the others how to jump off the train and then into the giant Pit entrance. Down in the Pit, a guard begins shooting at them. Tris realizes it’s Peter and that he’s not in the trance. She overpowers him and shoots him in the arm, and he agrees to lead them to the computers.
Tris’ father is disturbed by her brutality, but he doesn’t protest when she shoots several other guards on her way up to the top floor. At first the others follow her, but she orders Caleb and Marcus to stay with Peter while she heads to the control room with her father. They take an elevator to the top of the Pit. As the elevator doors open, her father shoots two guards. He then runs down the hallway to distract and kill the remaining soldiers and is killed in the process. Tris leaves him and runs to the end of the hallway, where she finds Tobias at the controls of a simulation room filled with monitors.
Tobias, looking confused, aims his gun at Tris and orders her to drop her weapon. She obeys, then runs at him and narrowly dodges the shot he fires at her. They fall to floor and wrestle for his weapon. Tobias punches her and slams her into a wall, but Tris eventually retrieves the gun. She doesn’t want to kill him and pleads with him to recognize her. When that fails, remembering the lessons she has learned about bravery and selflessness, she hands the gun to him. He presses the gun to her forehead and she places her hand on his chest.
Tobias doesn’t immediately shoot, so Tris embraces him. He drops the gun and comes out of the trance, and they kiss tearfully. As they watch the monitors, wondering how the program is able to control so many people, they spot Dauntless soldiers surrounding Caleb, Marcus, and Peter. Tobias stops the computer program just in time to save them. On the screens, they watch Dauntless across the city awaken from their trances and begin screaming, fighting, and shooting at one another.
They leave the control room and take the computer’s hard drive with them. Tris sees her father’s body in the hallway and vomits. They take the elevator down to the ground level, where Tobias is forced to reunite with his father. Tris harshly warns Marcus to stay away, then apologizes to Tobias, who says she has nothing to be sorry for. Now that she has time to think, she’s worried about her friends, and particularly concerned about what will happen when Christina discovers she killed Will.
They all take a train out of the city toward Amity headquarters, although Tris is uncomfortable that Marcus and Peter are still with them. On the train, Tobias tells Tris he loves her, and they kiss. As Marcus watches the hard drive in Tris’ hands, making her uneasy, she realizes they’ve all become factionless and wonders what will happen next.