A Florida sheriff’s officer who did “nothing” during the Parkland...

The sheriff’s deputy who failed to engage the shooter at Marjory Stoneman Douglas High School “believed he did a good job” because he called in the location of the massacre and gave a description of the shooter, a top union official said Thursday.

School resource officer Scot Peterson, who resigned in disgrace from the Broward County Sheriff’s Office, was “distraught” about the shooting that killed 17 people — but believed he did his duty, according to the president of the Broward Sheriff’s Office Deputies Association.

“He believed he did a good job calling in the location, setting up the perimeter and calling in the description (of Cruz),” said the union official, Jim Bell.

During a press conference, Peterson was lambasted by his sheriff, Scott Israel, for not engaging shooting suspect Nikolas Cruz last week as he slaughtered students and staff at Douglas High School in Parkland.

The union head said he didn’t want to second-guess Peterson — but strongly suggested that failing to take on Cruz was a mistake.

“We have to act, even if that means risking our lives to save many, many more lives. I would demand that from our union members,” said Bell, still a working deputy.

“You’re listening to an execution every time you hear the rifle shot.”

Sheriff Israel suspended Peterson without pay before the 33-year vet abruptly retired.

Peterson was not an association member, but sheriff’s brass asked Bell to contact him with the bad news.

Peterson had been the resource officer at Douglas High School since 2009 and made a base annual salary of $75,673.72 as of 2016, according to sheriff’s office records cited by the Sun-Sentinel newspaper.

That base salary, however, doesn’t include longevity and first-responder bonuses that probably brought Peterson’s non-overtime pay closer to $80,000, according to Bell.

Peterson’s pension will be 75 percent of the average of his top five earning years while on the job, the union head said.