The FBI might have been able to stop Wednesday’s Florida school shooting if the bureau had followed protocol when it received a tip about the shooter, the agency conceded Friday.

Someone close to Nikolas Cruz, who allegedly killed 17 people at a Florida high school this week, warned the FBI in January that Cruz owned a gun and might shoot up a school. The tipster told the bureau in a phone call that Cruz had a “desire to kill people,” and provided the FBI with information about his “disturbing social media posts” and “erratic behavior.”

The FBI released the details in a statement conceding their employees did not follow protocol to follow up on this tip. “Under established protocols, the information provided by the caller should have been assessed as a potential threat to life,” the statement said. “The information then should have been forwarded to the FBI Miami Field Office, where appropriate investigative steps would have been taken.”

The tip was not forwarded to Miami, and “no further investigation” was conducted into Cruz.

FBI Director Christopher Wray said he is “committed to getting to the bottom of what happened,” and that members of the bureau “deeply regret the additional pain this causes all those affected by this horrific tragedy.”

Law enforcement protocols already in place also might have stopped the Texas church shooting in 2017, and the Charleston church shooting in 2015. The gunman who carried out the Texas massacre had a history of domestic violence that should have prevented him from legally buying a gun. But the Air Force conceded after the shooting it had failed to enter his name into the federal database that would have prevented his gun purchase.

Similarly, paperwork and communication fumbles between the FBI and local law enforcement resulted in a background check error that allowed Dylann Roof to buy a gun in South Carolina, which he later used to massacre congregants at a Charleston church.