A surge in prices drove the cost of a gallon of gas above $5 nationwide for the very first time in June. In some places prices were even higher, contributing to the worst inflation in almost 41 years.

The numbers: Surging gasoline prices last month drove the rate of U.S. inflation to a nearly 41-year peak of 9.1%, offering little hope of help soon for Americans suffering from a high cost of living.

The consumer price index jumped 1.3% last month to mark the third time in the last four months it’s topped 1%. Economists polled by The Wall Street Journal had forecast a 1.1% advance.

The increase in inflation over the past year rose to 9.1% to 8.6%. The last time inflation was so high was in November 1981.

Higher prices of everything ranging from fuel to food to rent is expected to prod the Federal Reserve to sharply raise a key U.S. interest rate again when senior officials meet toward the end of this month.

By raising rates, the central bank aims to cool off the economy just enough to bring down inflation, ideally without triggering a recession. Yet many economists are doubtful the Fed can succeed in achieving what is referred to as a “soft landing.”

The CPI report wasn’t entirely a downer.

The so-called core rate of inflation, which omits food and energy, rose by a somewhat smaller 0.7%.

That was also above Wall Street’s forecast, but the increase in the core rate over the past year slowed to 5.9% from 6% in May and a recent high of 6.5% in March.

The Fed views the core rate as a more accurate measure of future inflation trends because gas and food prices tend to go up and down quickly and usually don’t stay high for very long. Indeed, gas prices have fallen sharply in the past month.

Yet as Fed officials acknowledge, food and gas are a big part of every family’s budget and the pain households experience is acute.

Big picture: High inflation is infecting every part of the economy.

Worker wages aren’t keeping up with price increases — real hourly wages have fallen 3.1% in the past year. Consumers face unpalatable decisions on what to buy and what to forego. Businesses are coping with rising costs and reduced demand. And government has to pay more in interest to service chronic budget deficits.

Unless inflation relents soon, the Fed will keep jacking up interest rates. If rates go high enough, they’ll slow the economy and even put the U.S. at the risk of a second recession in three years.

The Fed is trying to thread the needle, but just a few missteps could cause major damage to the economy, analysts say.

Key details:  The cost of energy, mainly oil and gas, shot up 7.5% in June and accounted for half of the increase in the cost of living. The average price of a gallon of gas in the U.S. topped $5 for the first time ever.

The good news? Oil prices have fallen sharply to around $96 a barrel from as high as $122 in early June. Prices at the gas pump, though still high, are also falling.

Food prices climbed a 1% last month, however, and show little sign of coming down. Grocery prices have climbed 12.2% in the past year to mark the biggest increase since 1979.

The cost of rent leaped 0.8% in June, the biggest monthly gain since 1986. Rents have risen 5.8% in the last 12 months.

Prices also rose last month for new and used vehicles, auto insurance, clothing, household furnishings and medical care.

Airfares were one of the few items to post a decline.

Inflation-adjusted wages, meanwhile, sank by 1% in June.