Walmart Inc.’s first-quarter results, which include 37% growth in e-commerce sales, show the retail giant is taking e-commerce share from its strongest online competitor: Amazon.com Inc.

In prerecorded earnings commentary, Walmart Chief Executive Doug McMillon said the company continues to be “more of a digital enterprise,” adding new brands online, improving the customer interface, like a more personalized baby registry. Walmart U.S. inventory for the quarter also increased 5.9% to make sure e-commerce fulfillment centers can handle more orders.

The speedy delivery effort continues with Walmart WMT, +0.52% announcing next-day delivery earlier this week. The announcement came just weeks after Amazon AMZN, +0.66% said it would move Prime members to free-one-day shipping.

Some analysts saw Amazon’s move to cut delivery times in half as an effort to stay ahead of competitors, who have improved their e-commerce offering due to the threat of the “Amazon effect.”

Read:Amazon’s move to one-day shipping shows the competition is catching up

Neil Saunders, managing director at GlobalData Retail, says Walmart is taking share from Amazon.

“In our view, Walmart is now a major competitive force in e-commerce and is capable of capturing shopper share from Amazon and others,” he said.

“Looking ahead, we think Walmart is fully committed to building a competitive edge with e-commerce, especially via delivery and collection services. While this could put pressure on margins in the short-term, we believe that Walmart’s logistics capability and its use of stores as points of distribution give it a major advantage over other players in the market, particularly Amazon.”

Walmart executives also talked up the use of its stores as a way to close the last-mile gap of getting merchandise to customers. By year-end, the company expects to offer same-day grocery delivery at 1,600 stores and grocery pickup from 3,100 locations.

“In addition to next-day delivery on an assortment of our best sellers, they can shop in our stores, pick up their order, get groceries and an increasing number of other store items delivered same-day, or choose from the two-day free shipping assortment that we’ve been building,” McMillon said.

See: Amazon and Walmart’s next-day shipping could bust your budget

Grocery is the area where Walmart has excelled, with first-quarter results showing that “online grocery remains a meaningful contributor to e-commerce growth,” according to Brett Biggs, Walmart’s chief financial officer. The home and fashion categories were also highlighted.

Coresight Research data shows that the number of people who bought groceries online from Walmart jumped to 37.4% in 2019 from 25.5% in 2018, with the number of Walmart’s online grocery shoppers more than doubling over the past year. Though still a small portion of online shopping activity, Walmart’s growth in online grocery coincides with an increase in U.S. online grocery sales overall.

“With around 35% of Walmart.com shoppers doing ‘some,’ ‘most’ or ‘all or almost all’ of their grocery shopping online, they are more likely to be ‘full-basket’ shoppers of the kind we see in bricks-and-mortar grocery stores,” the Coresight report said.

Also:Amazon Lockers are driving people to Whole Foods, but they’re staying less than 5 minutes

Certainly, Amazon’s lead in e-commerce is a solid one that’s bolstered by the 100 million-plus Prime members.

And not everything in Walmart’s earnings report was upbeat. Revenue for the quarter missed FactSet expectations.

In addition, there’s the threat of higher prices as the trade war continues. According to Chief Financial Officer Brett Biggs, the tariff impact is category-specific, so executives didn’t go into detail during a call with media Thursday morning. While Biggs reiterated the retailer’s commitment to low prices – “it’s part of our DNA,” he said – he also warned that higher tariffs lead to higher prices.

Charlie O’Shea, Moody’s lead retail analyst, thinks Walmart will manage the tariff situation well.

Don’t miss:Google Shopping now offers a personalized home page and a universal shopping cart

How checkout free retail could save U.S. consumers 118 hours a year

“As for tariffs, potential impact on Walmart and its shoppers is limited by its food business, and we also believe Walmart has the wherewithal both financially and via its vendor relationships to minimize the impact on both itself and its shopping base.”

While Greg Foran, chief executive of Walmart U.S., told the media that the “consumer is in pretty good shape,” GlobalData’s Saunders says the economy could tamp down the desire to spend.

“This is an exceptionally good result for a first quarter and is partly driven by higher customer numbers in stores and online,” Saunders wrote. “We believe that some of this is down to the fact that shoppers are now becoming more price sensitive, which plays into one of Walmart’s core strengths.”