An armed security guard who was at Marjory Stoneman Douglas High School has resigned after it was discovered he was outside the building where 17 people were killed last week, but did not enter and engage the gunman.

The security guard, according to Broward County Sheriff Scott Israel, arrived outside of the high school building where the shooting was taking place, but instead did not enter for several minutes. He had previously been put on suspension without pay.

"I think he remained outside for upwards of four minutes," Mr Israel said during a press conference Thursday.

The sheriff said that the guard was a sheriff's deputy assigned to the school, and that he "was absolutely on campus through this entire event. He was armed, he was in uniform".

"What I saw was a deputy arrive at the west side of building 12, take up a position, and he never went in," the sheriff said, referring to the building where the shooting occurred on the high school campus.

The deputy is one of three members of the Broward County law enforcement team to be investigated following the incident. Two other officers have been put on administrative leave from their duties while an internal investigation is conducted to determine if there is anything they could have done differently when notified previously about the 19-year-old shooter's behaviour.

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

"Devastated, sick to my stomach. There are no words," Mr Israel said, describing his feelings to reporters. "These families lost their children, we lost coaches. I've been to the funerals. I've been to the homes where they're sitting Shiva. I've been to the vigils. There are no words."

The fact that a security guard with a weapon did nothing to stop the shooting has led to criticism online of President Donald Trump's recent remarks that there should be more teachers with firearms in schools.

"An armed sheriff's deputy won't do it, but a kindergarten teacher who is already underpaid should be expected to be a weapons expert, ad be stocking an A-15 in their classrooms to help NRA client gun sales. What could go wrong," Amy Siskind, the president of the pro-women and girls group the New Agenda, tweeted in response to the news, referring to the National Rifle Association and apparently the style of rifle used in the attack, which has been identified as an AR-15.

Mr Trump has said that he would like to see more teachers with concealed weapons permits in American schools, and suggested Thursday that he is considering pay bonuses for educators who get trained to wield firearms at work.