Walmart on Thursday posted another set of strong U.S. results as it takes market share from weak rivals and builds up its online sales.
The retailer said U.S. comparable sales rose 2.8% in the second quarter, helped by price increases that consumers didn't balk at, a jump in grocery sales, and soaring e-commerce, where revenue rose 37%. All this was supported, in part, by Walmart's major investments to equip its stores for curbside pickup, grocery delivery, and in-store order pickup. The company's Sam's Club division reported a 1.8% comparable sales increase, while Walmart International also saw increases in most markets.
The U.S. sales results extended Walmart's streak of sales gains to 20 quarters and prompted the company to slightly raise its sales forecast for the year, sending shares up 6%.
At the same time, Walmart has found itself pulled into the middle of the contentious U.S. gun debate and sought to downplay its importance to national gun sales. Earlier this month, 22 people were killed in a shooting at an El Paso, Texas, Walmart store by a man targeting Hispanics. That came on the heels of another shooting at a Walmart store in Mississippi a few days before.
While many media reports have said Walmart is the biggest seller of firearms in the country, Walmart CEO Doug McMillon said in a statement the company estimates its sells about 2% of the firearms and 20% of the ammunition in the U.S., "which we believe places us outside at least the top three sellers in the industry."
Walmart is facing pressure from many quarters to stop selling guns, including from thousands of its own employees who have signed a petition. The company pointed out on Thursday it had stopped 20 years ago selling handguns in every state except Alaska, dropped selling military-style rifles in 2015, and last year raised the age limit to buy a firearm or ammunition to 21.
The company, which says it supports strengthening background checks for gun purchases, says the reauthorization of a ban on assault weapons should be debated, but on a conference call with media, a spokesman declined to say where Walmart would come down on the matter.
Walmart has a broad customer base and long worked hard not to get pulled into hot-button social debates, lest it antagonize one set of customers or another.
Walmart's strong quarterly results contrasted with soft results this week from Macy's, whose sales barely edged up, and a big decline at J.C. Penney, where revenue fell 9% as that department store attempts its umpteenth turnaround.
On Thursday, the U.S. Commerce Department said retail sales last month rose a seasonally adjusted 0.7%, better than expected by economists, despite concerns about tariffs. That suggests that any struggling retailers have themselves to blame.
More must-read stories from Fortune:
—Macy’s stock tanks as old problems prove intractable
—Olive Garden carbo-loads its popular pasta promotion
—H&M and Zara are closing stores to get ahead
—Goose Island will release eight Bourbon County variants this year—and more
—Listen to our audio briefing, Fortune 500 Daily
Follow Fortune on Flipboard to stay up-to-date on the latest news and analysis.