NEW YORK — Dick’s Sporting Goods will immediately end sales of assault-style rifles and high capacity magazines at all of its stores and ban the sale of all guns to anyone under 21 years old.

The announcement Wednesday comes two weeks after the school massacre in Parkland, Florida.

“When we saw what the kids were going through and the grief of the parents and the kids who were killed in Parkland, we felt we needed to do something,” Chairman and CEO Edward Stack said on “”Good Morning America.”

Dick’s, a major gun retailer, had cut off sales of assault-style weapons at Dick’s stores after the Sandy Hook school shooting. But Dick’s owns dozens of its Field & Stream stores, where there has been no such ban in place.

In a letter released Wednesday, Stack wrote, “We support and respect the Second Amendment, and we recognize and appreciate that the vast majority of gun owners in this country are responsible, law-abiding citizens. But we have to help solve the problem that’s in front of us. Gun violence is an epidemic that’s taking the lives of too many people, including the brightest hope for the future of America — our kids.”

Nickolas Cruz, the gunman who killed 17 people in Florida, mostly students, had purchased a shotgun at a Dick’s store in November 2017, Stack said.

“It was not the gun, nor type of gun, he used in the shooting,” Stack wrote. “But it could have been. Clearly this indicates on so many levels that the systems in place are not effective to protect our kids and our citizens.”

The gun issue has embroiled a number of companies since the Parkland shooting, from Delta Airlines to FedEx.

Dick’s Sporting Goods Inc. is based in Pittsburgh in a state where the first day of deer hunting season is an unofficial holiday for some families.

Stack on Wednesday called on elected officials to ban assault-style firearms, bump stocks and high capacity magazines and raise the minimum age to buy firearms to 21. He said universal background checks should be required, and there should be a complete universal database of those banned from buying firearms. He also called for the closure of the private sale and gun show loophole that waives the necessity of background checks.

Stack said on “Good Morning America” that Dick’s Sporting Goods Inc. is prepared for any potential backlash, but will not change its policies on gun sales.