Walmart said on Wednesday that it would no longer sell high-powered rifles in its stores in the United States. The decision followed years of public pressure on the retailer to stop selling some of the most lethal weapons associated with many of the nation’s mass shootings.

The move predated the fatal shootings of two TV journalists in Virginia on Wednesday, and authorities have said the gunman in that attack used a handgun, a type of weapon the company does not sell.

Walmart, the nation’s largest seller of guns and ammunition, attributed its decision to lower consumer demand for such military-style rifles, not gun politics. It said that it was adding to its offerings of shotguns and other weapons used by hunters.

The decision put Walmart’s gun sale policies back in the spotlight as debates over gun control erupted again because of the Virginia shootings. Gun control advocates viewed the company’s action as significant because similar types of weapons were used by shooters in recent massacres, including an attack on a Colorado movie theater by a gunman who killed 12 people, and the Sandy Hook Elementary School shooting, in which 20 children and six adult staff members died.