U.S. inflation hit a fresh 40-year high in May, unexpectedly accelerating in a broad advance that pressures the Federal Reserve to extend an aggressive series of interest-rate hikes and adds to political problems for the White House and Democrats.

The consumer price index increased 8.6% from a year earlier, Labor Department data showed Friday. The widely followed inflation gauge rose 1% from a month earlier, topping all estimates. Shelter, food and gas were the largest contributors.

The so-called core CPI, which strips out the more volatile food and energy components, rose 0.6% from the prior month and 6% from a year ago, also above forecasts.