A closely watched measure of annual wholesale inflation slowed last month, an indication that price pressures are still high but starting to let up a little before they reach consumers.

Prices from producers and manufacturers increased 4.7% in the 12 months that ended in July, according to the Producer Price Index, a measurement of average price changes. That was a slowdown from 5.5% in June, according to Bureau of Labor Statistics data released Thursday.

That’s better than expected: Economists had estimated that producer-level prices would rise 0.1% from June and that the annual rate would slow to 4.9%, according to FactSet consensus estimates.

Wholesale inflation is cooling off after the war in Iran caused a spike in oil and gas prices and other commodities. Producer-level inflation climbed to a four-year high of 5.9% in May before falling energy prices cooled things off a bit in June and July.

But since oil and gas prices can vary widely on a monthly basis and are subject to more on-time shocks – especially in the wake of a war – economists closely watch “core” inflation gauges that remove volatile components. Core PPI, which excludes food and energy prices, rose 0.2% in July and slowed to 4.2%, the lowest rate in four months.