Higher energy and housing prices boosted overall U.S. inflation in December, a sign that the Federal Reserve’s drive to slow inflation to its 2 percent target will likely remain a bumpy one.

Thursday’s report from the Labor Department showed that overall prices rose 0.3 percent from November and 3.4 percent from 12 months earlier. Those gains exceeded the previous 0.1 percent monthly rise and the 3.1 percent annual inflation in November and were slightly above economists’ forecasts.

More than half the increase in prices from November to December reflected higher housing costs. Energy costs, along with food prices, also contributed to inflation.

Excluding volatile food and energy costs, though, so-called core prices rose just 0.3 percent month over month, unchanged from November’s increase. Core prices were up 3.9 percent from a year earlier – the mildest such pace since May 2021. Economists pay particular attention to core prices because, by excluding costs that typically jump around from month to month, they’re seen as a better guide to the likely path of inflation.

Inflation has cooled more or less steadily since hitting 9.1 percent in mid-2022. Still, despite the slowdown in price increases, along with steady economic growth, low unemployment and healthy hiring, polls show many Americans are dissatisfied with the economy

That disconnect, a likely issue in the 2024 elections, has puzzled economists and political analysts. A major factor is the lingering financial and psychological effects of the worst bout of inflation in four decades. Much of the public remains exasperated by higher prices. Prices are still 17 percent higher than they were before the inflation surge began and are still rising.

Pollsters and economists say there’s never been as wide a gap between the underlying health of the economy and public perception. Wage gains have outpaced inflation in recent months, meaning that Americans’ average after-inflation take-home pay is up. Yet a poll conducted in November by The Associated Press-NORC Center for Public Affairs Research, about three-quarters of respondents described the economy as poor. Two-thirds said their expenses had risen.

Thursday’s figures reflected the outsize role that housing plays in the U.S. consumer price index – roughly a third of the index. A measure of homeownership alone makes up about 25 percent of CPI. The government measures homeownership costs by calculating how much rent a homeowner would likely charge if that home were being rented, a figure seen as equivalent to the cost of owning the property. Overall housing prices rose 0.5 percent from November to December. Rents were up 0.4 percent, homeownership 0.5 percent.

Over the past year, consumers have enjoyed price declines for some individual items. Furniture and bedding prices are down 4 percent, for example. Men’s suits and coats are 6 percent lower, televisions 10 percent, sporting goods nearly 3 percent, sausages nearly 4 percent.

The Fed, which began aggressively raising interest rates in March 2022 to try to slow the pace of price increases, wants to reduce year-over-year inflation to its 2 percent target level. And there are solid reasons for optimism that inflationary pressure will continue to recede in the coming months.

The Federal Reserve Bank of New York reported this week, for example, that consumers now expect inflation to come in at just 3 percent over the next year, the lowest one-year forecast since January 2021. That’s important because consumer expectations are themselves considered a telltale sign of future inflation: When Americans fear that prices will keep accelerating, they will typically rush to buy things sooner rather than later. That surge of spending tends to fuel more inflation.

But that nasty cycle does not appear to be happening. And when Fed officials discussed the inflation outlook at their most recent meeting last month, they noted some hopeful signs: In particular, they noted an end to the supply chain backlogs that had caused parts shortages and inflation pressures.

Many economists have suggested that slowing inflation from 9 percent to around 3 percent was easier to achieve than reaching the Fed’s 2 percent target could prove to be.

“It just tells you the last mile is a struggle,’’ said Vincent Reinhart, chief economist at Dreyfus Mellon.

The Fed’s policymakers have signaled that they expect to cut interest rates three times this year. Financial markets rallied in anticipation of lower borrowing costs, and exuberant traders began predicting a rate cut as early as the Fed’s next meeting in March.

But Reinhart, a former top Fed economist, suggested that December’s slightly higher-than-expected inflation and the need for the central bank’s policymakers to agree on any changes in monetary policy will likely delay the first rate cut, probably until September.

AP staff writer Anne D’Innocenzio and video journalist Laura Bargfeld contributed to this report.