An armed officer assigned to the Florida school where a gunman killed 17 people last week stood outside the building during the shooting and did not intervene, the local sheriff says.
Deputy Scot Peterson has resigned after being suspended, Broward County Sheriff Scott Israel said.
"I am devastated. Sick to my stomach.He never went in," Sheriff Israel said.
Earlier this week President Trump said arming school teachers could prevent school shootings.
The proposal has long been championed by the powerful National Rifle Association (NRA) gun lobby.
Sheriff Israel said Mr Peterson was on campus, armed and in uniform when the shooting at the Marjory Stoneman Douglas High School campus in Parkland began.
He said video footage showed Mr Peterson arriving at the building where the shooting was taking place about 90 seconds after the first shots were fired and that he remained outside for about four minutes. The attack lasted six minutes, Sheriff Israel said.
Asked what Mr Peterson should have done, Sheriff Israel said: "Went in, addressed the killer, killed the killer."
Mr Peterson is yet to publicly comment on what happened. Sheriff Israel said he had not given a reason for why he did not go into the building where the shooter was.
Sheriff Israel said he would not be releasing the video showing Mr Peterson and might never do so, "depending on the prosecution and criminal case" against the 19-year-old suspect accused of carrying out the shooting, former student Nikolas Cruz.
The gunman used a semi-automatic AR-15 assault rifle, police say, and escaped the scene before being seen and arrested later.
School resource officers are police officers who are responsible for safety and crime prevention in schools, the US government says.
There are between 14,000 and 20,000 such officers in the US, according to the National Association of School Resource Officers.
Mr Peterson had been in his position at the school since 2009, local media report.