In a statement, Walmart said: "We take seriously our obligation to be a responsible seller of firearms."

In Washington, President Donald Trump urged a group of lawmakers with diverse views to come up with a comprehensive bipartisan solution in a televised meeting.

Republican leaders in Congress have rejected raising the minimum legal age to buy rifles from 18 to 21, but Mr Trump said he "would give pretty serious thought to it", despite opposition from the NRA, which supported him as a candidate.

He told the lawmakers: "Some of you people are petrified of the NRA, you can't be petrified."

Also on Wednesday, a teacher in the state of Georgia was arrested after barricading himself in a classroom and firing a handgun. No-one was injured.

In announcing its policy change, Dick's Sporting Goods said in a statement that it had "tremendous respect and admiration for the students organising and making their voices heard regarding gun violence in schools and elsewhere in our country".

It added: "We have heard you. The nation has heard you."

The retailer said it was committing itself to:

It said that while it supported the Second Amendment to the US constitution, which protects the right to keep and bear arms, "gun violence is an epidemic that's taking the lives of too many people".

Dick's CEO Edward Stack told CNN he expected a backlash from some customers, saying "the hunt business is an important part of the business, no doubt about it".

The Parkland shooting suspect, 19-year-old Nikolas Cruz, bought a gun at Dick's but not the weapon he is alleged to have used in the attack, Mr Stack said.

"We did everything by the book, and we did everything that the law required, and he was still able to buy a gun," he told ABC.

At Marjory Stoneman Douglas High School, a line of police officers, school staff and community members bearing flowers greeted some 3,000 students who returned to classes on Wednesday morning. There were also many reporters, shouting questions to the teenagers about how they felt.

Lyliah Skinner, a 16-year-old student, told the BBC before she left home: "We're not going to really be learning much today - it's all about healing."

She also said she was feeling nervous "because I'm scared it's gonna happen again". Lyliah listed people she knew who would not be returning, including Joaquin Oliver, who sat just in front of her in a class they shared.

David Hogg, a senior student and now leading activist, was also feeling trepidation. It was "really hard to think about" what occurred two weeks ago, he said.

"Imagine getting in a plane crash and having to get back on the same plane again and again and again and being expected to learn and act like nothing's wrong," he told NBC News.

The handling of the shooting by authorities sparked CRIticism after it emerged that the FBI and local police had failed to follow up on multiple tips about Mr Cruz, and that an armed deputy at the school had stayed outside the school building while the attack took place.

The school's Building 12, the site of the shootings, will remain closed and cordoned off indefinitely.

Members of Florida's State House and Senate will soon begin reviewing proposed bills related to firearms, which need their approval and also that of Governor Rick Scott.

Among other restrictions, they would raise the legal age to buy rifles from 18 to 21 and giving police more control to seize weapons from mentally ill people.

A controversial $67m voluntary programme to arm school staff, including teachers, would ensure they were trained by law enforcement and allowed to carry concealed weapons on campus, according to the New York Times.