Americans trimmed their spending unexpectedly in May compared with a month before, underscoring how surging inflation on daily necessities like gas is causing them to be more cautious about buying discretionary items.

U.S. retail sales slipped 0.3% last month, down from a revised 0.7% increase in April, the Commerce Department said Wednesday.

A sharp decline in auto sales, largely because of higher prices and shortages of new car inventories, depressed the retail sales figure. Excluding autos, retail sales actually rose 0.5% last month. But excluding sales from gas stations, retail sales slipped 0.7%, showing how higher prices at the pump are accounting for more of shoppers’ overall spending.

The report also highlighted shoppers’ pullback on some of the products that were in hot demand during the height of the pandemic but are now falling out of favour. Sales fell roughly 1% for furniture and home furnishings stores and electronic and appliance retailers. Building and garden supply stores, as well as general merchandise retailers, are also showing signs of a sales slowdown.

Want more immediate, memorable insights? Listen to this Soundbites episode, featuring Greg McCullough of Putnam Investments.

Sales online fell 1%, as shoppers go back to physical stores. Meanwhile, sales at food stores rose 1.2% due to higher prices, not increased consumption. Business at restaurants was up 0.7%.

The retail report released Wednesday covers only about a third of overall consumer spending and doesn’t include services such as haircuts, hotel stays and plane tickets.

“Surging prices might finally be taking their toll on real consumption,” said Andrew Hunter, senior economist at Capital Economist.

The snapshot comes as Americans have been providing critical support to the economy even after a year of seeing prices spiral higher for gas, food, rent, and other necessities. And signs of recession risks are rising. Inflation is at a 40-year high. Stock prices are sinking. The economy actually shrank in the first three months of this year. And the Federal Reserve is making borrowing much costlier.

Among the biggest worries is surging inflation, which has become more widespread and more persistent than expected. Consumer prices rose 8.6% last month from a year earlier, the biggest annual 12-month jump since 1981. Helping to fuel the surge were much higher prices for everything from airline tickets to restaurant meals to new and used cars.

Meanwhile, the national average price at the pump reached $5.01 per gallon on Tuesday, up from $4.45 a month ago, and surging more than 60% in one year.

Russia’s invasion of Ukraine has worsened global food and energy prices. Extreme lockdowns in China over Covid-19 worsened supply shortages.

On Wednesday, the Fed is set to raise its benchmark interest rate, which affects many consumer and business loans, by as much as three-quarters of a percentage point. That would be the Fed’s largest rate hike since 1994, and it could herald the start of a period of especially aggressive credit tightening by the central bank — and with it, a higher risk of recession.

Sal Guatieri, senior economist at BMO Capital Markets Economics, said the weak retail sales report likely won’t influence the Fed, as it will need to see a “sustained period of weakness in domestic demand and likely labor markets before breathing a sigh of relief on the inflation front.”

Cleary, retailers, both big and small, are noticing customers changing their habits in recent months.

Last month, major retailers like Target reported a faster-than-expected shift away from couches and casual wear that were in hot demand during the height of the pandemic to more pre-pandemic routines. They’re also seeing shoppers become more focused on basics and trade down to cheaper products as they juggle higher daily costs. Target said earlier this month that it was canceling orders on items like sofas and marking down mounds of unwanted inventory while raising prices elsewhere to offset higher costs.

Melissa Baker, founding partner at Fenwick Brands, a Birmingham, Alabama-based venture firm that focuses on consumer brands, cites new behaviors as gas at the pump keeps climbing higher. At $4 per gallon, shoppers traded down to cheaper brands, for example. But as gas hit $5 per gallon, she is seeing they’re also changing their behavior before they venture out, by limiting their shopping trips to save on gas.

Arie Kotler, chairman, president and CEO of Arko Corp., one of the largest operators of convenience stores in the U.S., largely in rural areas and small towns, said higher gas prices are making customers fill up on gas at its gas stations a little at a time to control their spending. Customers also are buying bigger bags of snacks like potato chips to save on trips. In response to customers’ harder financial times, the chain is offering cheaper coffee and food like a slice of pizza for $1.99. Still, Kotler said the company is in a sweet spot since it sells everyday items.

”We are trying to help our consumer since we know they don’t have discretionary income and the money they have available is much less than they had last year,” he said.

AP Economics Writer Chris Rugaber in Washington contributed to this report.