Billy is sent a series of tapes that Frank secretly recorded of his conversations with Colin, and Billy sends a copy to Colin. Madolyn (Vera Farmiga) intercepts it, listens to it, and realizes that Colin was working with Frank. Colin meets Billy to try to pay him off, but Billy arrests him. Billy has called Brown (Anthony Anderson), his friend from the academy, to help him, and Brown allows him to take Colin down the elevator. When the elevator opens, Colin's academy friend Barrigan (James Badge Dale) shoots Billy, killing him. When Brown gets downstairs and sees what's happened, Barrigan shoots him as well, and then reveals to Colin that he also worked for Costello ("Did you think you were the only one?"). Colin then shoots Barrigan. He tells the police that Barrigan was Frank Costello's mole and recommends Costigan to be honored by the department. At the funeral, he asks a crying Madolyn about the baby, but she walks right past him. When Colin returns to his apartment, he finds Dignam (Mark Wahlberg) waiting for him, Dignam has become aware that Colin was Frank's primary mole, due to the information given to Madolyn by Billy near the end. Dignam kills Colin. In the final scene, a rat runs along the outside balcony railing, framed by the gold dome of the Massachusetts State House in the background.