An armed police officer who has been criticised for failing to confront the Florida high school gunman claims he acted properly and stuck to his training during the mass shooting.

Scot Peterson, who resigned as a Broward County sheriff's deputy after he was told he would be suspended without pay over his actions during the massacre, has faced a barrage of public criticism - including from President Donald Trump, who claimed he would have tackled the gunman unarmed if he had been in the same situation.

Video footage of the incident, in which 17 students and staff members died earlier this month, showed Mr Peterson standing outside the school for more than four minutes while shots were being fired, despite being the armed officer responsible for guarding the school. The sheriff’s office put Mr Peterson under investigation last week, and he resigned shortly afterwards.

Now, an attorney for Mr Peterson has claimed the officer acted properly by not entering the building because he believed the shots were coming from outside. According to attorney Joseph A DiRuzzo, his client followed protocol by seeking shelter and trying to assess what was happening.

“Let there be no mistake, Mr Peterson wishes that he could have prevented the untimely passing of the seventeen victims on that day, and his heart goes out to the families of the victims in their time of need,” Mr DiRuzzo said in a statement obtained by the Washington Post.

“However,” he added, “the allegations that Mr Peterson was a coward and that his performance, under the circumstances, failed to meet the standards of police officers are patently untrue.”

The sheriff's office did not immediately respond to a request for comment.

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

But Broward County Sheriff Scott Israel condemned the deputy's actions last week, saying the officer should have entered the school building and engaged the shooter. Mr Trump suggested he was a “coward,” and “not a credit to law enforcement”.

Mr Trump continued hs criticism on Monday, saying he would have run into the school in Mr Peterson’s place – even without a weapon.

“You don’t know until you test it, but I really believe I’d have run in there even if I didn’t have a weapon,” he said at a press conference.

Donald Trump says he would have run into the Florida school shooting 'unarmed'

Mr DiRuzzo said the Florida Department of Law Enforcement had launched an investigation into the department’s response to the shooting, which he hopes will ultimately clear his client’s name.

The statement adds to mounting criticism of law enforcement’s response to the incident. Police officers from a neighbouring department have claimed they saw two additional Broward County officers waiting outside the school when they responded to the shooting. The sheriff's office is investigating the claim. But Mr Trump has also already criticised those officers too - saying on Monday that they "weren't exactly medal of honour winners".

The sheriff’s office has admitted that they received multiple warnings of the alleged shooter’s disturbing behaviour, having responded to 23 incidents involving suspect Nikolas Cruz or his family since 2008. The FBI also received multiple tips about Mr Cruz, which they failed to pursue fully.

Mr Israel has resisted calls for him to resign in the wake of the shooting, claiming he should not be blamed for his deputy's response.

“Leaders are responsible for the agency, but leaders are not responsible for a person,” Mr Israel said in an interview with NBC.