Beto O'Rourke, a former congressman from El Paso, Texas, the site of a gun massacre last month, was one of the first 2020 hopefuls to react.
"This is a step in the right direction — and I'm grateful Walmart has taken action — but we can't rely on corporations to stop gun violence," O'Rourke said in a post on Twitter. "We need universal background checks, we need red flag laws, and we need to buy back every single assault weapon."
The retail giant announced Tuesday that it will discontinue sales of certain calibers of short-barrel rifle ammunition. In a memo distributed to employees, CEO Doug McMillon said that Walmart will also stop selling handguns in Alaska, "marking our complete exit from handguns."
The announcement follows two deadly mass shootings over the summer at Walmart stores in two Texas cities, El Paso and Odessa. O'Rourke is from El Paso and represented the city as a congressman.
After the El Paso shooting, which left 22 people dead, O'Rourke temporarily left the campaign trail to remain in the city. The shooting in Odessa took place on Saturday. It killed seven people.
Other presidential candidates also praised Walmart's decision.
In a post on Twitter, Sen. Elizabeth Warren, D-Mass., wrote that it was a "good start — but it's not nearly enough. Walmart can and should do much more. And we need real gun reform, now."
"I applaud the brave Walmart workers who called on the company to stop selling guns. This is a good step, but we still have a gun violence crisis," wrote Sen. Bernie Sanders, a Vermont independent.
Sen. Cory Booker, D-N.J., said he was encouraged by the announcement, crediting the company's employees and gun control activists.
"I'm hopeful that this activism proves to politicians that Americans want better standards for gun ownership in this country," Booker wrote in a tweet.
O'Rourke has pledged to implement a mandatory buyback program for certain high-powered firearms if elected. While speaking with reporters in Virginia over the weekend, he was asked about what gun owners who fear that the government will take away their guns should think about the plan.
"So I want to be really clear that that's exactly what we're going to do," O'Rourke said. "Americans who own AR-15s and AK-47s will have to sell them to the government."
In a statement, the National Rifle Association, a gun rights advocacy group, chastised the retailer.
"Lines at Walmart will soon be replaced by lines at other retailers who are more supportive of America's fundamental freedoms," the group wrote.
Shares of Walmart were up about 0.3% in midday trade Tuesday.