Walmart Inc. advanced after meeting sales estimates and indicating that shoppers will absorb some of the costs from President Donald Trump’s tariffs on Chinese imports.

Comparable sales for Walmart stores in the U.S. climbed 3.4% in the first quarter, its best for the period in nine years. Sales of groceries—Walmart’s biggest business—fueled the increase, and a later-than-usual U.S. flu season boosted health and wellness products. The shares rose as much as 4.1% Thursday in New York, the biggest intraday gain in almost three months.

“This is a very good set of results,” Neil Saunders, an analyst at GlobalData Retail, said in a note. “The U.S. operation remains the star of the show.”

Walmart’s response to potential higher levies will likely set the tone for other discount retailers, and its decisions on whether to pass along or absorb the additional costs will have ripple effects on American consumers. In its favor, Walmart’s clout with suppliers gives it more room to maneuver, and much of its food comes from U.S. sources, easing the impact.

“We will do everything we can to keep prices low, but increased tariffs lead to increased prices,” Chief Financial Officer Brett Biggs said in a Thursday morning interview. “It’s very item- and category-specific. There are some places where as we get tariffs, we will take prices up.” Finding alternative manufacturers “is one of a number of actions that our merchants are considering.”

Tariffs, according to Evercore ISI analyst Greg Melich, are “the next key swing factor,” as they could “wipe out” earnings growth across the sector this year.

It’s not a Walmart-specific issue: Macy’s Inc. said Wednesday that the latest tariffs, if implemented, would likely be reflected in its prices. Ralph Lauren Corp. also said after reporting results this week that consumer price-hikes could be an end result, though it’s first trying to work with Chinese suppliers to drive down costs and further diversify its supply chain out of China.

“It is hard to do the math to find a path that gets you to a place where you don’t have a customer impact,” Macy’s Chief Executive Officer Jeff Gennette said on an earnings call Wednesday, describing the impact of the U.S.-China trade negotiations as a “stay tuned” situation.

Consumer Impact

While Walmart is reluctant to raise prices, such a move is “great for retailers,” according to Edward Jones analyst Brian Yarbrough. “The big concern, though, is whether those price increases will stick and will they slow down consumer spending.”

Widespread increases in prices could push up inflation, something that’s consistently been weaker than the Federal Reserve’s 2% target. Economists currently project gains in inflation of between 0.1 to 0.3 percentage point amid the Chinese tariffs and counter-levies by 2020. At the same time, Fed policymakers have continued highlighting patience when digesting data.

Walmart said Thursday that it witnessed a “modest increase” in inflation for non-food, everyday staple categories in the quarter.

Web Competition

Web sales in the U.S. increased 37%, slightly ahead of the company’s expected growth rate for the full year. Walmart and rival Amazon.com Inc. are locked in a fierce battle for internet shoppers, and both have recently pledged to speed up delivery times. While Amazon has the overall lead in e-commerce, raking in about 50 cents of every dollar spent, Walmart has the best-developed web grocery business with 2,450 stores offering curbside order pickup and nearly 1,000 providing home delivery.

Walmart’s online growth has come at a cost to profitability, though. Gross margins of 24.3% were in line with analysts’ estimates but did mark a slight year-on-year contraction. That can be attributed to higher labor costs, price reductions and online sales that typically deliver lower margins than in-store sales. Transportation expenses, meanwhile, have eased somewhat this year, the company said.

On the down side, Sam’s Club’s same-store sales fell short of estimates, dragged down by the elimination of tobacco from some stores.