WASHINGTON (AP) — Inflation in the United States accelerated in September, with the cost of housing and other necessities intensifying pressure on households, wiping out pay gains that many have received and ensuring that the Federal Reserve will keep raising interest rates aggressively.

Consumer prices rose 8.2% in September compared with a year earlier, the government said Thursday. On a month-to-month basis, prices increased 0.4% from August to September after having ticked up 0.1% from July to August.

Yet excluding the volatile categories of food and energy, so-called core inflation jumped last month — a sign that the Fed’s five rate hikes this year have so far done little to cool inflation pressures. Core inflation climbed 0.6% from August to September and 6.6% over the past 12 months. The yearly core figure is the biggest increase in 40 years. Core prices typically provide a clearer picture of underlying price trends.

Major U.S. markets swung sharply lower, with the Dow Jones Industrial Average futures moving from several hundred points up to a 400-point decline in seconds. Markets in Europe tumbled as well.

Thursday’s report represents the final U.S. inflation figures before the Nov. 8 midterm elections after a campaign season in which spiking prices have fueled public anxiety, with many Republicans casting blame on President Joe Biden and congressional Democrats.

Inflation has swollen families’ grocery bills, rents and utility costs, among other expenses, causing hardships for many and deepening pessimism about the economy despite strong job growth and historically low unemployment.

As the election nears, Americans are increasingly taking a dim view of their finances, according to a new poll by The Associated Press-NORC Center for Public Affairs Research. Roughly 46% of people now describe their personal financial situation as poor, up from 37% in March. That sizable drop contrasts with the mostly steady readings that had lasted through the pandemic.

The September inflation numbers aren’t likely to change the Fed’s plans to keep hiking rates aggressively in an effort to wrest inflation under control. The Fed has boosted its key short-term rate by 3 percentage points since March, the fastest pace of hikes since the early 1980s. Those increases are intended to raise borrowing costs for mortgages, auto loans and business loans and cool inflation by slowing the economy.

Minutes from the Fed’s most recent meeting in late September showed that many policymakers have yet to see any progress in their fight against inflation. The officials projected that they would raise their benchmark rate by an additional 1.25 percentage points over their next two meetings in November and December. Doing so would put the Fed’s key rate at its highest level in 14 years.

Along with lower gas prices, economists expect the prices of used cars to reduce or at least restrain inflation in the coming months. Wholesale used car prices have dropped for most of this year, though the declines have yet to show up in consumer inflation data. (Used vehicle prices had soared in 2021 after factory shutdowns and supply chain shortages reduced production.)

Large retailers, too, have started offering early discounts for the holiday shopping season, after having amassed excess stockpiles of clothes, furniture and other goods earlier this year. Those price cuts might have lowered inflation in September or will do so in the coming months.

Walmart has said it will offer steep discounts on such items as toys, home goods, electronics and beauty. Target began offering holiday deals earlier this month.

Yet prices for services — particularly rents and housing costs — are remaining persistently high and will likely take much longer to come down. Healthcare services, education and even veterinary services are still rising rapidly in price.

“Services price increases tend to be more persistent than increases in the prices of goods,” Raphael Bostic, president of the Federal Reserve Bank of Atlanta, noted in remarks last week.

Rising rental costs are a tricky issue for the Fed. Real-time data from websites such as ApartmentList suggest that rents on new leases are starting to decline.

But the government’s measure tracks all rent payments — not just those for new leases — and most of them don’t change from month to month. Economists say it could be a year or longer before the declines in new leases feed through to government data.