The torrid pace of inflation slowed in July for the first time in months, but prices remained near the highest level in 40 years.

The Labor Department said Wednesday that the consumer price index, a broad measure of the price for everyday goods including gasoline, groceries and rents, rose 8.5% in July from a year ago, below the 9.1% year-over-year surge recorded in June. Prices were unchanged in the one-month period from June.

Those figures were both lower than the 8.7% headline figure and 0.2% monthly gain forecast by Refinitiv economists, a welcoming sign for the Federal Reserve as it seeks to cool price gains and tame consumer demand. Stock futures rose on the better-than-expected report, with the Dow Jones Industrial Average climbing 0.9% and S&P 500 futures gaining 1.2%.

So-called core prices, which strip out the more volatile measurements of food and energy, climbed 5.9% from the previous year, below the 6.1% forecast from economists. Core prices also rose less than expected, rising 0.3% on a monthly basis – a smaller increase than in April, May and June – an encouraging sign that inflation is starting to loosen its stranglehold on the economy. 

This is a developing story. Please check back for updates.