The armed deputy assigned to the campus of a Florida high school during a deadly shooting last week stayed outside the building during the attack and failed to engage the shooter, the county sheriff has said.

As a consequence, Scot Peterson, on duty as the school resource officer at Marjory Stoneman Douglas High School in Parkland, resigned from the department, said Broward County Sheriff Scott Israel, who earlier had suspended the officer from the force.

He did not say if Mr Peterson would face criminal charges.

Mr Israel said he decided to suspend Mr Peterson after viewing a video that showed the deputy's actions during the rampage that killed 17 people.

A former student Nikolas Cruz, 19, is accused of carrying out the attack with an AR-15-style assault weapon.

"What I saw was a deputy arrive at the west side of Building 12, take up a position and he never went in," Mr Israel said.

The building is popularly known as "the freshman building".

Mr Israel said he would not release the video that shows Mr Peterson's actions at this time and may never do so, depending on the prosecution and criminal case.

President Donald Trump yesterday met with six students from the high school, listening to their stories of survival.

He suggested arming teachers and sports coaches and using armed former military personnel to provide school security.

"We're going to do something about this horrible situation that's going on. We're all going to figure it out together," he said.

"We're going to be very strong on background checks, we're doing very strong background checks, very strong emphasis on the mental health."

Sorry, this video has expired Father of shooting victim: 'Our students have to be protected'

Survivors of the shooting have been vocal in calling for a gun law reform.

On Thursday, survivors descended on the state's Capitol with one overarching message: It's time for action.

The students split into several groups to talk with politicians and other state leaders about gun control, the legislative process, and mental health issues, while others held a rally on the steps of the building in Tallahassee.

Sorry, this video has expired "We cannot protect our guns before we protect our children" say Florida school shooting survivors

Reuters