Much of what goes into a police officer’s response depends on the situation. Officers typically are instructed to slow down and use tactics such as taking cover to give them more time to accurately judge a situation. But active shooters now call for an entirely different response. The affidavit for Mr. Peterson’s arrest said he had been trained to immediately confront the gunman in the hope of saving lives.

Expectations and training have changed drastically since the Columbine High School massacre in 1999, when law enforcement was criticized for failing to quickly confront the assailants and 13 people died. Until then, typical police protocol had been for officers to wait for backup, or for the SWAT team to arrive.

But after that, many departments rewrote policies to emphasize that every minute could mean another death. Officers were instructed to impede or take down the gunman immediately. Dan Oates, who was the chief of police in Aurora, Colo., when 12 people died and 70 were wounded in a shooting in a movie theater there in 2012, said officers were now drilled in tactics that put the well-being of hostages and innocents first.

“That’s what you sign on for if this happens on your watch,” Chief Oates, now the chief in Miami Beach, said.

None of the officers who responded to the movie shooting hesitated to go in, said Lt. Jad Lanigan, one of the first to arrive, but that did not mean they did not feel fear; some had difficulty coping with the horror surrounding them and went into what he likened to a computer “blue screen.”

“I had people literally walk up to me, and they were blank-faced,” he recalled. “There was too much for the human brain to process. We had to take them out of it for a little bit, give them some clear direction, and they were able to plug themselves back in.”