Soaring prices of goods such as new cars, gas, groceries and home furnishings drove U.S. inflation to a 40-year high. Now rising wages could make it harder for the Federal Reserve to unwind the runup in inflation.

For the past year, high inflation was largely fueled by too much demand for goods and too little supply. Businesses couldn’t get enough materials to produce all the goods customers wanted because of pandemic-related shortages. And goods were in particularly high demand because people were afraid to go out.

Hence the surge in prices. The rate of inflation jumped to as high as 8.5% from less than 2% just 16 months ago.

The worst might be over. The shipping delays and shortages are slowly starting to ease up, for example, and more progress through the rest of the year could partly undo the main source of inflation.

It already seems to be happening.

The rate of inflation in so-called core goods, for example, has slowed two months in a row to 9.7% in April from a pandemic peak of 12.3% two months ago. The core rate strips out food and energy and is viewed as a more reliable barometer of underlying inflation trends.

But now a new problem has emerged: Rising labor costs.

Workers are taking advantage of the tightest labor market in decades by switching jobs for better pay. And surging inflation is also pushing them to seek out higher wages.

Manufacturers, the producers of goods, can absorb the higher price of labor more readily because it represents a smaller portion of their total costs.

Not so for service companies that now dominate the U.S. economy — about six of every seven American workers is employed by one. And the cost of labor is a bigger burden for them.

As the pandemic fades, consumers are gradually shifting their spending from goods to services — getting a haircut, dining out, going to a game or theater, traveling and so forth.

As a result, service-oriented companies need even more workers, and the only way they are going to attract them is by offering higher pay.

The impact of rising wages is becoming more evident.

Over the past year the cost of services excluding energy has climbed to a 21-year high of 4.9% from as low as 1.3% at the start of 2021. Early in the pandemic the cost of most services rose relatively slowly because of weak demand.

Higher rent has been a big factor in the recent surge in service costs, but virtually every service company has to shell out more now in wages and benefits. That is, even if they can find enough labor.

There’s only two ways to slow rising pay and its small but but growing contribution to inflation, economists say. Boost the supply of labor — or slow the economy.

Right now there are a record two job openings for every unemployed person, the highest level on record dating to 2001. The 1960s were probably the last time the labor market was as tight.

Yet increasing the supply of labor is highly unlikely, economists say. Immigration levels have declined, baby boomers are steadily retiring, birth rates have fallen and the native-born U.S. population is growing at the slowest pace ever.

The U.S. adult population is forecast to increase by only 35,000 as month in the next two years, economist at Jefferies LLC say, down from 80,000 before the pandemic and 200,000 in the late 1990s.

“Population growth will not be a solution the current labor shortage,” said chief economist Aneta Markowska of Jefferies. “In fact, it is part of the problem.”

The only other solution appears to be slowing the economy and thus risking the chance of recession. An increasing number of economists, including former senior officials at the Fed, think a recession in unavoidable in the next year or two.

The senior chairman of Goldman Sachs, one of the nation’s largest banks, also said the odds of recession are rising in an interview with CBS News.

There’s “a very, very high risk factor” Lloyd Blankfein warned on Sunday.