A former Parkland, Florida, school safety officer who failed to confront the gunman when 17 people were fatally shot at the Marjory Stoneman Douglas High School last year, was arrested Tuesday on multiple charges, including child neglect and perjury.

Scot Peterson, who worked as a security officer at the campus, was charged with seven counts of neglect of a child and three counts of culpable negligence and one count of perjury, the Florida Department of Law Enforcement said.

The charges carry a maximum potential sentence of 96 and a half years in state prison, the Broward State Attorney's Office said.

Lawyers for Peterson denounced the charges as "unprecedented" and "spurious." "The State’s actions appear to be nothing more than a thinly veiled attempt at politically motivated retribution against Mr. Peterson," attorney Joseph DiRuzzo said in a statement to NBC News. "The charges against Mr. Peterson should be dismissed immediately."

Seventeen students, teachers and staff were killed in the shooting on Feb. 14, 2018, and another 17 were injured. A former student, Nikolas Cruz, is charged with 17 counts of murder and 17 counts of attempted murder.

Cruz has pleaded not guilty although his public defenders said he would plead guilty in exchange for a life sentence. Prosecutors want the death penalty.

Peterson, 56, was the only other person at the school with a gun when the shooter opened fire.

Download the NBC News app for breaking news and politics

He was taken into custody in Broward County after a 15-month investigation that showed he "refused to investigate the source of the gunshots, retreated during the active shooting while victims were being shot and directed other law enforcement who arrived on scene to remain 500 feet away from the building," the state law enforcement department said.

Department Commissioner Rick Swearingen said in a news release that Peterson "did absolutely nothing" to stop the shooting, and that cost people their lives.

“There can be no excuse for his complete inaction and no question that his inaction cost lives,” Swearingen said.

The State Attorney's Office said the law enforcement department interviewed more than 180 witnesses, as well as reviewed video surveillance during the investigation.

"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,” Broward County Sheriff Gregory Tony added.

Peterson, who was fired Tuesday from the Broward County Sheriff's Office, said during a June 2018 interview with NBC's "Today" that he did not go into the building because of miscommunication.

"I didn't get it right," he said. "But it wasn't because of some, 'Oh, I don't want to go into that building. Oh, I don't want to face somebody in there.' It wasn't like that at all."

"Those are my kids in there," he added. "I never would have sat there and let my kids get slaughtered. Never."

Peterson was booked into the Broward County Jail on a $102,000 bond. Under the terms of his bond, he must wear a GPS monitor, surrender his passport and is prohibited from possessing firearms while the case is pending.

Jeff Bell, president of the Broward Sheriff’s Office Deputies Association, told NBC News on Tuesday that the union has concerns with the child neglect charges due to the caveat that someone must be a caretaker.

"Does that mean now that any time an officer is assigned a detail that involves children around the country, are they now caretakers?" Bell asked. "I worry about future officers, not just Scot Peterson, being charged by overzealous prosecutors with child neglect when we’re not caretakers."

Fred Guttenberg, whose daughter Jaime died in the Parkland shooting, told Peterson to "rot in hell" on Twitter Tuesday.

"You could have saved some of the 17," Guttenberg said. "You could have saved my daughter. You did not and then you lied about it and you deserve the misery coming your way."

The brother of Meadow Pollack, another student who died in the attack, said on Twitter that he hoped Peterson spends "the rest of his life in prison."

"He cowered in Parkland while my sister died defenseless and lied about his failure to confront the shooter," Hunter Pollack said.