Walmart, the largest retailer in the US, joined Dick's Sporting Goods in raising the minimum age to purchase firearms to 21 after the massacre at a Florida high school that has reopened a fierce debate over gun control in America.

Walmart said that "in light of recent events" it was raising the age for purchasers of firearms and ammunition to 21 from 18.

The retailer is also was removing items from its website that resemble assault rifles, including non-lethal airsoft guns and toys. Walmart stopped selling assault firearms and accessories in 2015 and only sells handguns in Alaska.

Dick's, a U.S. retailer of camping supplies, sporting goods and guns, will also stop selling assault rifles and high-capacity magazines.

It will not sell any guns to people under age 21, Dick's chief executive, Ed Stack, said in an open letter on the company's website.