A former deputy sheriff who hid rather than enter a Florida school and confront a gunman who killed 17 was arrested and charged Tuesday with neglecting children and committing perjury.

Scot Peterson, normally assigned by the Broward County Sheriff’s Office to help secure the school in Parkland, Florida, came under stinging public rebuke for leaving his post as the massacre unfolded on Feb. 14, 2018.

The Florida Department of Law Enforcement charged Peterson, 56, with seven counts of neglect of a child, three counts of culpable negligence, and one count of perjury.

If convicted of all charges, he could face 97 years in prison, the Sun-Sentinel newspaper reported.

Peterson was the school resource officer when a former student with a rifle shot and killed 17 persons and left 17 others wounded at Marjory Stoneman Douglas High School.

His arrest comes after a 15-month investigation by state authorities.

Police arrested Peterson at the headquarters of the Broward County Sheriff’s Office and booked him at the Broward County Main Jail. The Broward State Attorney’s Office will prosecute the case.  

“The FDLE [Florida Department of Law Enforcement] investigation shows former Deputy Peterson did absolutely nothing to mitigate the MSD [Marjory Stoneman Douglas] shooting that killed 17 children, teachers and staff and injured 17 others,” FDLE Commissioner Rick Swearingen said in a formal statement. “There can be no excuse for his complete inaction and no question that his inaction cost lives.”

Investigators interviewed 184 witnesses, reviewed hours of video surveillance, and wrote 212 reports to determine the actions of law enforcement in response to the massacre at the school, the state agency said.

Investigators found that Peterson refused to investigate the source of gunshots and retreated as students and adults were being shot inside the school.

The deputy directed other law enforcement who arrived on the scene to remain 500 feet away from the building, the investigation found.

“I was pleased the Florida Department of Law Enforcement in conjunction with the State Attorney’s Office conducted a thorough investigation that yielded the arrest of Scot Peterson,” Broward Sheriff Gregory Tony said in a written statement.

“All the facts related to Mr. Peterson’s failure to act during the MSD massacre clearly warranted both termination of employment and criminal charges. It’s never too late for accountability and justice.”

Florida Gov. Ron DeSantis, in one of his first acts as governor, fired Tony’s predecessor, Broward Sheriff Scott Israel, for his office’s response to the school shooting.