(Reuters) - A former sheriff’s deputy charged with felony child neglect for failing to enter a Florida high school building to intervene during a deadly mass shooting there last year posted bond and was freed from jail on Thursday following an initial court appearance.

Slideshow ( 8 images )

Scot Peterson, 56, who legal experts described as one of the nation’s few law enforcement officers, if not the first, ever to be criminally prosecuted for failing to take some action, had been in custody since his arrest on Tuesday.

During a brief hearing in Broward County Circuit Court, Judge Elizabeth Scherer agreed to lower Peterson’s bond to $39,500, from an initial $102,000, and ordered him to turn over his passport within 48 hours, according to Kristi Grimm, a spokeswoman for the county State Attorney’s Office.

A few hours later, Peterson posted bond and was released from jail, she said.

In addition to seven counts of felony child neglect, Peterson is charged with four misdemeanor counts of culpable negligence and perjury in a criminal complaint that carries a maximum prison sentence of nearly 97 years if he were convicted.

The case stems from what prosecutors allege was a criminal failure to exercise his duty to protect the lives of students during a Feb. 14, 2018 shooting rampage that left 17 people dead and 17 wounded at Marjory Stoneman Douglas High School in Parkland, Florida, a Miami suburb.

Peterson was armed and assigned to Marjory Stoneman Douglas at the time as the school resource officer. He was the first police officer to arrive outside the building while the shooting was under way, according to the sheriff’s office and surveillance video. He resigned a week after the shooting.

‘I LOST 17’

A 14-month-long Florida Department of Law Enforcement inquiry found Peterson failed to investigate the source of gunfire and retreated to take cover rather than rushing toward the shots. The shooting lasted about seven minutes.

Peterson said in a Miami Herald interview last June he was haunted by the tragedy, replaying the scene over and over in his mind, recounting how he initially believed the shots might be coming from a parking lot or the roof.

“I’ve cut that day up a thousand ways with a million different what-if scenarios, but the bottom line is I was there to protect, and I lost 17,” he said.

Although Peterson did not enter a plea at Thursday’s hearing, his lawyer, Joseph DiRuzzo, has said he plans to “vigorously defend” his client against the charges, which he said “lack basis in fact and law.”

DiRuzzo contended his client, who was widely disparaged in the media as “the coward of Broward,” was being made a scapegoat for a massacre perpetrated by a lone gunman.

The accused killer, Nikolas Cruz, who was 19 at the time and had been expelled from the school for disciplinary problems, was charged with the slayings. He is awaiting trial.

Peterson also faces legal trouble in civil court. Last May, the father one of the students killed in Parkland filed a wrongful death lawsuit against the former deputy.