Soon afterwards, authorities released footage showing Mr Peterson waiting outside the school as the shooting was taking place.

Following an investigation by the Florida Department of Law Enforcement (FDLE), Mr Peterson was arrested on Tuesday on seven counts of neglect of a child, three counts of culpable negligence and one count of perjury.

The investigation showed Mr Peterson "did absolutely nothing" to prevent the shooting, FDLE Commissioner Rick Swearingen said in a statement.

"There can be no excuse for his complete inaction and no question that his inaction cost lives," he added.

Media playback is unsupported on your device

Media captionTrump: "I would have run in even if I didn't have weapon"

Broward County Sheriff Scott Israel voiced his anger after viewing the footage of Mr Peterson remaining outside the building for four minutes while the killings were taking place. The shooting lasted just six minutes.

"I am devastated. Sick to my stomach. He never went in," Sheriff Israel said, adding that he should have entered and "killed the killer".

President Trump said the officer "certainly did a poor job" and branded him a coward.

Mr Peterson maintained he believed the shots were coming from outside the school.

He told NBC that he "didn't get it right", but added: "Those are my kids in there. I never would have sat there and let my kids get slaughtered."