Using Queenan's phone, Sullivan reaches Costigan, who refuses to abort his mission. Sullivan learns from Queenan's diary of Costello's role as an informant for the FBI, causing him to worry about his own identity being revealed. With Costigan's help, Costello is traced to a cocaine drop-off, where a gunfight erupts between Costello's crew and the police, which results in most of the crew being killed. Costello, confronted by Sullivan, admits he is an FBI informant. Costello tries to shoot Sullivan, but Sullivan shoots him multiple times. With Costello dead, Sullivan is applauded the next day by everyone on the force. In good faith, Costigan comes to Sullivan for restoration of his true identity and to be paid for his work, but notices the envelope from Costello on Sullivan's desk and flees, finally realizing Sullivan is the enemy. Fearing retaliation, Sullivan erases Costigan's records from the police computer system.