Inflation rose again in June, thanks to persistent increases in gas, food, and rent prices, setting a new 40-year high and likely cementing the Federal Reserve’s plans for another large rate hike this month.

Prices rose 9.1 percent year on year, up from 8.6 percent the previous month and the largest gain since November 1981, according to the Labor Department’s Consumer Price Index released Wednesday. Bloomberg polled economists, who predicted inflation would reach 8.8 percent.

Consumer prices increased 1.3 percent on a monthly basis, the largest increase since 2005, compared to a 1% increase in May.

“Ouch,” said Ian Shepherdson, chief economist at Pantheon Macroeconomics, of the latest price increase in a research note.

Along with other economists, he noted that June likely marked the peak of inflation, despite the fact that a similar prediction in the spring proved premature.

The report supports the Federal Reserve’s plans to raise its key interest rate by three-quarters of a percentage point for the second month in a row as part of an aggressive anti-inflation campaign.

The news disappointed already pessimistic investors. The Dow Jones Industrial Average fell by more than 300 points after the latest figures were released. The S&P 500 dropped 37 points, or about 1%. In addition, 10-year bond yields increased. They were hovering at 3.03 percent in midmorning trading. June’s surge again was led by gasoline prices, which increased 11.2% from the prior month and 59.9% annually. The good news is that regular unleaded gasoline averaged $4.65 on Tuesday, down from $5 a month ago.

Grocery prices increased by 1% in May and 12.2% over the previous year. Both gas and food prices have risen as a result of Russia’s war in Ukraine, which has disrupted global supplies of oil, wheat, corn, and other commodities.

Cereal prices increased 2.5 percent from the previous month and 14.2 percent from a year ago in June. Bread was up 1.6 percent month over month and 10.8 percent year over year. Chicken prices rose by 1.5 percent in May and 17.3 percent year on year.

There were some promising signs. Bacon prices fell 1.9 percent, the second consecutive large monthly drop. In addition, beef and veal prices fell by 2.3 percent. Commodity prices have recently fallen due to recession fears and dwindling consumer demand. According to Wells Fargo economist Sam Bullard, this has already pushed down gas prices and set the stage for more moderate food price increases in the coming months.

Pooja Sriram, an economist at Barclays, believes that higher fertilizer costs for farmers could keep grocery prices relatively high throughout the year. Russia is the world’s leading exporter of fertilizer, and the Ukraine conflict has increased the price of both that commodity and its main ingredient, natural gas.

Core prices, which exclude volatile food and energy items, rose 0.7 percent in June after rising 0.6 percent the previous month. This reduced the annual increase to 5.9 percent from 6 percent in May.

As people who hunkered down with family members during the pandemic moved into their own apartments, rent increased by 0.8 percent per month and 5.8 percent over the past year.

There were some encouraging developments for summer visitors. Despite rising demand, airline fares fell 1.8 percent and hotel rates fell 2.8 percent, but they are still up 34.1 percent and 10%, respectively, from a year ago.

There are indications that inflation will likely ease in the coming months. Aside from falling commodity prices, supply chain issues are easing, wage increases may be slowing, and retailers’ bloated inventories are causing large discounts for customers.

Also, as the pandemic has subsided, consumer spending has begun to shift from goods to services, such as dining out and travel. “This will be the last big increase,” Shepherdson of Pantheon Macroeconomics says.