“The FDLE investigation shows former Deputy Peterson did absolutely nothing to mitigate the MSD shooting that killed 17 children, teachers, and staff and injured 17 others,” the department’s commissioner, Rick Swearingen, said in a statement. “There can be no excuse for his complete inaction and no question that his inaction cost lives.”

Officials determined that Peterson, along with Sergeant Brian Miller, “neglected their duties,” and both were terminated Tuesday. Peterson was taken into custody after an administrative discipline hearing.

The criminal charges were an unusual instance of law enforcement officers being held criminally liable for failing to protect the public.

“This is the first time I have seen somebody so charged like this,” said Clinton R. Van Zandt, a former profiler with the FBI and an expert on mass shootings. “I think that every police officer, sheriff, and FBI agent understands that you have to go to the threat and stop it and that we are no longer going to wait for SWAT or set up perimeters.”

The Department of Law Enforcement said its inquiry showed that Peterson, 56, did not investigate the source of the gunshots, retreated during the shooting while victims were still under attack, and directed other law enforcement officers to remain 500 feet away from the building.

The sweeping 15-month investigation included interviews with 184 witnesses, along with reviews of video surveillance, to piece together what officials acknowledged was a slow and chaotic law enforcement response.

In January, Governor Ron DeSantis suspended the Broward County sheriff, Scott Israel, citing neglect of duty and “incompetence.” He named as his replacement Gregory Tony, a former sergeant with the Coral Springs Police Department.

In his new position, Tony oversaw an internal investigation of seven deputies at the department, including Peterson, and their handling of the Feb. 14, 2018, shooting.

“We cannot fulfill our commitment to always protect the security and safety of our Broward County community without doing a thorough assessment of what went wrong that day,” Tony said. “I am committed to addressing the deficiencies and improving the Broward Sheriff’s Office.”

Van Zandt said prosecutors appeared to be sending a message to the community that “we hear you are disappointed, and we will let the criminal justice system determine whether he made significant mistakes, whether perhaps he was a coward or not, or whether he acted properly with the information that he had.”

But, he contended, “it is going to be a challenge for prosecutors if the deputy stays with his story that his training did not teach him that, and that the circumstances did not dictate to him that his actions should have been to go in rather than facilitate the rescue of kids coming out and direct responding police officers coming in. In essence, he was directing traffic.”

Andrew Pollack, whose 18-year-old daughter, Meadow, died in the attack, said he welcomed Peterson’s arrest.

“It’s about accountability, and there’s to be more in Broward County,” said Pollack, who previously filed a wrongful-death suit against Peterson. “We knew all along that this guy did something very terrible. He let my daughter die, and a lot of other victims in the school — teachers and children — and he didn’t do his job.”

In an interview Tuesday, Pollack said he and his lawyer had turned over records — including a deposition of Peterson — in the civil case to law enforcement officials to consider during their criminal inquiry.

Pollack said he hoped Peterson would be convicted and sentenced to a lengthy prison term. “He brought his Bible with him to the deposition,” he said. “Let him bring his Bible with him to prison. He can read the whole thing a bunch of times.”

He paused and added, “I don’t care what they do to this guy. Let him live with it.”