Donald Trump has hit out the sheriff's deputy who did not confront the Florida high school gunman behind the deaths of 17 people - suggesting he was either a "coward" or that he froze under extreme pressure.

In recent days, the President has called for increased security in schools in the wake of the shooting, going as far as suggesting teachers should be armed to deal with such threats.

But when asked by reporters outside the White House about whether the actions of armed Deputy Scot Peterson - who did not enter the school while the shooting was taking place - gave him pause for thought over more armed security, Mr Trump said the officer "certainly did a poor job".

"That is a case where somebody was outside, they are trained, they didn’t react properly under pressure, or they were a coward," the president said.

“He’s trained his whole life… but when it came time to get in there and do something, he didn’t have the courage or something happened. He certainly did a poor job,” Mr Trump added.

Mr Peterson took up a position viewing the western entrance of that building for more than four minutes after the shooting started, but “he never went in,” Broward County Sheriff Scott Israel said at a news conference on Thursday. The shooting lasted about six minutes.

Deputy Peterson, was suspended without pay and placed under investigation, then chose to resign, Sheriff Israel said. When asked what Mr Peterson should have done, Sheriff Israel said the deputy should have “went in, addressed the killer, killed the killer.”

Florida shooting – in pictures Show all 10 1 /10 Florida shooting – in pictures Florida shooting – in pictures Police arrest a suspect in connection with the shooting at the Marjory Stoneman Douglas High School in Parkland, Florida Reuters Florida shooting – in pictures Parents wait for news after reports of a shooting at Marjory Stoneman Douglas High School in Parkland, Florida AP Florida shooting – in pictures Anxious family members wait for news of students AP Photo/Wilfredo Lee Florida shooting – in pictures Students being evacuated from the school AP Florida shooting – in pictures Students being evacuated from the school Getty Florida shooting – in pictures People gather waiting for word from students AP Florida shooting – in pictures Parents waiting for news on their children AP Florida shooting – in pictures People gather at a hotel where students were taken after the shooting Getty Florida shooting – in pictures Florida Governor Rick Scott speaks to the media as he visits Marjory Stoneman Douglas High School following the shooting AFP/Getty Florida shooting – in pictures Dr. Igor Nichiporenko, Medical Director Trauma, left, and Dr. Evan Boyer, Medical Director, Emergency Services, speak about treating victims and the suspect at a press conference outside Broward Health North hospital AP

Sheriff Israel said he was “devastated, sick to my stomach. There are no words. I mean these families lost their children. We lost coaches. I've been to the funerals. ... I've been to the vigils. It's just, ah, there are no words.”

In a statement, Florida Governor Rick Scott's communications director said the governor wanted a “complete investigation” into Mr Peterson's actions.