Seven months after the gunman in the Parkland, Fla., school shooting was sentenced to life in prison for murdering 14 students and three staff members, prosecutors on Wednesday will begin trying to convince a jury that a former sheriff’s deputy should also be held criminally responsible for his actions on the day of the massacre.

Opening statements are expected to begin Wednesday in the trial of the school resource officer on duty at the time of the attack, Scot Peterson, who faces 10 charges, including seven counts of child neglect, for not confronting the gunman.

A conviction of a member of law enforcement for inaction during a mass shooting could have sweeping repercussions for policing in Florida and beyond, legal experts say. Mr. Peterson faces a decades-long prison sentence on the accusation that he failed in his role as a caregiver for the students.

Mr. Peterson was the first officer on the scene, and by his own account he did not rush into Building 1200 at Marjorie Stoneman Douglas High School, where the gunman killed 17 people and wounded 17 others. He instead took cover in the stairway of an adjacent building, and has said he was unsure where the shots were coming from and feared that a sniper was firing from outside.

Mr. Peterson, then a 27-year veteran, also directed other officers away from where the gunman was firing an AR-15-style weapon on the campus in Parkland, an affluent community about 20 miles northwest of Fort Lauderdale.

The trial, which is expected to last two months, is likely to expose issues that police departments across the United States have been grappling with since the Columbine school shooting in 1999, said Robert Jarvis, a law professor at Nova Southeastern University in South Florida.

Before Columbine, officers were told to wait for SWAT teams to confront mass shooters, but “since then, we’ve been expecting cops to run in,” Mr. Jarvis said. “It’s a really interesting question as to what we expect cops to do.”

That expectation was underscored in May 2022 when the police in Uvalde, Texas, waited more than an hour before entering a classroom at Robb Elementary School, where an 18-year-old man had fatally shot 19 students and two teachers. The gunman was ultimately killed by members of a U.S. Border Patrol tactical team, and subsequent investigations faulted Texas police for failing to act quickly.

In the Parkland case, the charges against Mr. Peterson relate to the deaths and injuries on the third floor of the building, which prosecutors say he had a chance to stop. According to an investigation by the Florida Department of Law Enforcement, the gunman was making his way to the third floor 73 seconds after Mr. Peterson arrived in a golf cart at Building 1200. Mr. Peterson was armed with a service revolver and was not wearing body armor.

Mr. Peterson is charged with seven felony counts of child neglect in the deaths of four students and the wounding of three others, aged 14 to 17. He also faces three misdemeanor counts of culpable negligence for the deaths of an 18-year-old student and a 35-year-old cross country coach and the wounding of a teacher.

In the lead-up to the trial, a defense lawyer, Mark Eiglarsh, tried to persuade Judge Martin Fein of Broward County Circuit Court to dismiss the child neglect charges, arguing that they were not justified under Florida law.

To be convicted of child neglect, state law says, the person must be a caregiver to the child. Mr. Eiglarsh argued that the law does not include the police in the definition of a caregiver.

Noting that the Florida Supreme Court and other state appellate courts had found that a teacher, a babysitter and even a kidnapper were caregivers under the law, Judge Fein rejected the defense request, saying, “This determination will be made by the jury based on the evidence presented at trial.”

Mr. Jarvis, the law professor, said finding a school resource officer to be a caregiver to thousands of students “would impose liability when no one thought it would apply.”

He added that prosecutors also face a daunting task in trying to convince the six jurors and four alternates that Mr. Peterson is guilty of culpable negligence. To do so, they must show Mr. Peterson knew or should have known that his actions — or inaction — put students and staff in danger.

Mr. Peterson is also charged with a misdemeanor count of perjury, with prosecutors accusing him of lying to investigators in telling them that he heard only two or three shots coming from the building and that he did not see any students running from it when he was in the stairwell with his gun drawn.

While other witnesses described the confusion that surrounded the shooting, many told investigators that it sounded to them as if the gunfire was coming from Building 1200.

Mr. Peterson said he was unsure.

“I didn’t even think it was even inside the building ’cause it was so clear and loud,” he said, according to a Florida Department of Law Enforcement report. “At that point I knew it was close to this building, but I wasn’t even sure if it was in the building.”

The defense has said it will call 22 witnesses who also thought the shots came from outside, The Associated Press reported.

Mr. Peterson, who would lose his $104,000 annual pension if convicted, retired after the shooting and was fired retroactively. He was released on bond and moved to North Carolina.

He has expressed deep remorse for the deaths.

“It’s haunting,” he told The Washington Post in June 2018. “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.”

But Mr. Peterson also insisted that he followed police procedures.

“I have my gun out and I’m scanning, and I’m looking. And that’s what we’re trained to do,” he told NBC. “When you — when you get a position and cover it, we are trained to scan and look.”

But state investigators said Mr. Peterson, who was an active shooter incident instructor for the school system, ignored crucial parts of the training.

“If you are on scene or in the area and hear gunshots, you should immediately access what you have and prepare to respond,” investigators wrote, quoting from the active shooter training course. “Remember, every time you hear a gunshot in an active shooter incident, you have to believe that is another victim being killed.”