The sheriff’s deputy on duty at Marjory Stoneman Douglas High School during the school shooting on Feb. 14 was discovered to have taken absolutely no action to try to stop the gunman from slaughtering 17 people, and resigned Thursday after being suspended without pay.

Thursday, Broward County Sheriff Scott Israel announced that the deputy had simply responded to the shooting by taking a position outside the door, but never went inside to confront the shooter.

Friday, the New York Post reported that the deputy actually thought he had done a good job “because he called in the location of the massacre and gave a description of the shooter.”

The deputy, identified as school resource officer Scot Peterson, reportedly was “distraught” about the shooting, 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.

The New York Post reported that Peterson was a 33-year veteran, and shared details on his salary and pension:

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.