The question Florida prosecutors may have to contend with if former school resource officer Scot Peterson goes on trial for not confronting the gunman during the Parkland high school massacre came up Wednesday at his first court appearance: What exactly is a “caregiver?”

Peterson’s lawyer Joseph DiRuzzo III argued that the criminal statute under which the former Broward County deputy was charged with seven counts of neglect of a child and three counts of culpable negligence was not specifically drafted for law enforcement officers and is usually applied to parents. He is also charged with one count of perjury.

“The actions taken today against my client should concern the American Public and every public employee who, under the State’s misguided legal theory, could be criminally liable for actions taken as a ‘caregiver’,” DiRuzzo said in a press release Tuesday after Peterson was charged.

Florida Department of Law Enforcement Commissioner Richard Swearingen insisted after the hearing that Peterson was “technically qualified as a caregiver under statute.”

“So, when he failed to act, he failed to fulfill his duties of being a caregiver,” he said. “They decided there were seven felony counts under that statute.”

But legal and law enforcement experts interviewed by NBC said they’re not so sure about that.

“One of the elements prosecutors have to prove is that he demonstrated gross recklessness or wanton disregard for others or the safety of others,” Celeste Higgins, a criminal defense attorney and law professor at the University of Miami, said. “He may not have had a duty as a caregiver for the purposes of these charges. Maybe the result of this is that it is going to redefine what a caregiver is under Florida law.”

Higgins said charging a law enforcement official for “not doing something is unusual.”

“Much will depend on what standard operating procedures he was working with, what protocols he was provided with, was he trained to wait until backup came on, what actions did he take when backup did arrive,” Higgins said. “There seems to be some evidence that even after backup arrived, he still didn’t make the decision to go in.”

NBC News legal analyst Danny Cevallos agreed that prosecutors may be stretching the meaning of “caregiver” to go after Peterson.

Former school resource officer Scot Peterson appears in court via television feed in Fort Lauderdale, Florida, on June 5, 2019. South Florida Sun-Sentinel via AP

Under Florida law, he said, a “caregiver” means a parent, adult household member, or other person responsible for a child’s welfare.

And while Florida courts have recognized a “broad” interpretation of the term “caregiver,” Cevallos said he’s found no previous instance of a school resource officer like Peterson being charged with neglect of a child.

“Don’t forget that police officers have a degree of immunity for their official actions, too,” he said.

California State University, San Bernardino professor Brian Levin, who studies hate crimes and walked a beat in Harlem as a New York City police officer, said Peterson’s “conduct was disgraceful and if there is a chargeable offense, it should be pursued.”

But going after Peterson for child neglect might not be the best way to do that.

“It’s possible that the Florida law may not be technically applicable,” he said. “However, I think legislators and police professionals are going to review the duty of caregivers with respect to situations like this.”

“If the evidence showed that somebody had a legal duty to respond because of their profession and the particular vulnerability of a victim, I have no problems seeing that punished under criminal law,” he added. “The issue is where this particular law is expansive enough to allow for this kind of charge.”

Peterson, who was fired Tuesday from the Broward County Sheriff's Office, was the only other person at the Marjory Stoneman Douglas High School with a gun when former student Nikolas Cruz allegedly burst inside on Feb. 14, 2018, and opened fire.

When it was over, 17 students, teachers and staffers were dead and another 17 were wounded.

Cruz is charged with 17 counts of murder and 17 counts of attempted murder. He has pleaded not guilty although his public defenders said he would plead guilty in exchange for a life sentence.

Peterson, 56, was arrested 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.

During a June 2018 interview with NBC's "Today," Peterson said 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."