NEW YORK (AP) — Walmart announced Wednesday that it will no longer sell firearms and ammunition to people younger than 21 and would also remove items resembling assault-style rifles from its website.

The move comes after Dick's Sporting Goods announced earlier in the day that it would restrict the sale of firearms to those under 21 years old. It didn't mention ammunition. Dick's also said it would immediately stop selling assault-style rifles, and its CEO took on the National Rifle Association by demanding tougher gun laws.

Walmart said its decision came after the company reviewed its firearm sales policy in light of the mass shooting at Marjory Stoneman Douglas High School in Parkland, Florida, that killed 17 people. The teenage gunman used an AR-15 rifle. It said it takes "seriously our obligation to be a responsible seller of firearms" and also emphasized its background of serving "serving sportsmen and hunters."

Several major corporations, including MetLife, Hertz and Delta Air Lines, have cut ties with the NRA since the Florida tragedy, but none were retailers that sold guns. The NRA has pushed back aggressively against calls for raising age limits for guns or restricting the sale of assault-style weapons.

Walmart Inc. stopped selling AR-15 guns and other semi-automatic weapons in 2015. It doesn't sell bump stocks, the accessory attached to a semi-automatic gun that makes it easier to fire rounds faster. It also doesn't sell large-capacity magazines. It also says it doesn't sell handguns, except in Alaska.

In announcing the change in policy, the company said it had processes in place to make sure it was applied for online sales.