President Trump on Friday slammed the Florida sheriff’s deputy who did nothing during the Parkland school massacre, suggesting the armed officer behaved like a “coward.”

“He trained his whole life. When it came time to get in there and do something, he didn’t have the courage or something happened, but he certainly did a poor job — there’s no question about that,” Trump told reporters, referring to Marjory Stoneman Douglas High School resource officer Scot Peterson.

Peterson, who resigned in disgrace from the Broward County Sheriff’s Office on Thursday, was armed and in uniform on campus when authorities say AR-15-wielding Nikolas Cruz went on the Feb. 14 shooting rampage, killing 17.

Broward County Sheriff Scott Israel said that Peterson “clearly” knew there was an active shooter but did “nothing” to intervene.

Speaking on the matter, Trump said: “He was there for five minutes, for five minutes that was during the entire shooting. He heard it right at the beginning, so he certainly did a poor job.”

Trump — who has called for arming qualified teachers and staffers to prevent mass school shootings — said it’s too easy for “crazy people” to come into schools and start blasting away.

“If they’re not gun-free — if there are guns inside — held by the right people, by highly trained professionals, you’re going to see this end. It won’t be happening again. Our schools are essentially gun-free zones and that makes them very dangerous places,” he said.

The president continued: “But that’s a case where somebody was outside. They’re trained. They didn’t react properly under pressure or they were a coward.”

“It was a real shock to the police department,” he continued.