US President Donald Trump has suggested that arming teachers could help prevent massacres such as last week's mass shooting at a Florida high school.

Mr Trump voiced support for the idea during an emotional White House meeting with students who survived the shooting and a parent whose child did not.

Seventeen people were killed when Nikolas Cruz used an AR 15 assault rifle to carry out the shooting at Marjory Stoneman Douglas High School.

It was the second deadliest public school shooting in US history, which stirred the nation’s long-running debate about gun rights and public safety.

"If you had a teacher ... who was adept at firearms, it could very well end the attack very quickly," said Mr Trump, who acknowledged the idea would be controversial.

He sat in the middle of a semi-circle in the State Dining Room of the White House, listening intently as students wept and pleaded for change.

He vowed to take steps to improve background checks for gun buyers.

"I don't understand why I can still go in a store and buy a weapon of war, an AR," said 18-year-old Sam Zeif, sobbing after he described texting his family members during the Florida shooting.

"Let's never let this happen again please, please," he said.

Andrew Pollack, whose 18-year-old daughter Meadow was among the victims at the shooting, told Mr Trump that it was far too easy for people such as Cruz to acquire weapons. 

He said: "I'm here because my daughter has no voice. She was murdered last week and she was taken from us, shot nine times on the third floor.

"We as a country failed our children. This shouldn't happen."

We need your consent to load this Facebook contentWe use Facebook to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences

Mr Trump said his administration would emphasise background checks and mental health in an effort to make schools safer.

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

"It's not going to be talk like it has been in the past," he said.

It comes after hundreds of students joined scattered protests around the United States, calling for a ban on sales of assault rifles similar to the weapon used in the Florida attack.

Survivors of the Florida shooting poured into the Florida state capital, Tallahassee, to demand that politicans restrict sales of assault rifles.

Some wore T-shirts and carried signs reading "We call B.S.," one of the slogans of the movement started by the survivors.

Protesters joined the call from the streets of Washington, Chicago and Pittsburgh.

The mass shooting on 14 February stirred the nation's long-running debate about gun rights and public safety, prompting officials from state lawmakers to Mr Trump to consider new action.

Investigators said that Cruz, who has been charged with 17 counts of premeditated murder, purchased the AR-15 nearly a year ago. He had been expelled from the high school for disciplinary problems.

"Nikolas Cruz was able to purchase an assault rifle before he was able to buy a beer," said Laurenzo Prado, a Stoneman junior, referring to a Florida law that allows people as young as 18 to buy assault weapons.

"The laws of the country have failed," he said.

Read more:

Lawmakers in Tallahassee said they would consider raising the age limit to 21, the same standard for handguns and alcohol, though today the state Senate opted not to take up a gun control measure.

Students scattered across the United States walked out of classes in sympathy protests. Hundreds of teenagers from the Washington suburbs gathered at the White House in the hours before Mr Trump's meeting.

"I came out here because I don't feel safe in my school," said 15-year-old Allyson Zadravec.

"I want to make sure that everyone who can do something about it hears that I don’t feel safe in my school.

Similar walkouts were held or planned in Florida, Phoenix, Arizona; Pittsburgh and Chicago, according to witnesses and local news media accounts. 

Mr Trump's meeting at the White House came a day after he said his administration would take steps to ban "bump stocks", an accessory that enables a rifle to shoot hundreds of rounds a minute.

Mr Trump's support for any tightening of gun laws would mark a change for the Republican, who was endorsed by the National Rifle Association gun lobby during the 2016 presidential campaign.

The NRA opposes an outright ban on bump stocks but has said it would be open to restrictions on the devices.