Producer prices shrank unexpectedly last month, government data released on Thursday showed, after prices for energy goods fell back sharply in news that will sooth concerns over inflation.

Overall finished goods prices declined 0.3 percent versus a 0.8 percent rise in May, posting its largest decline since it fell 0.4 percent in May 2003.

The closely watched measure of core producer prices, which strips out food and energy costs, gained by 0.2 percent. But on a 12-month basis, its pace crept up to 1.8 percent compared with 1.7 percent last month.

Over the last 12 months, overall producer prices have risen 4.0 percent.

Wall Street had expected both overall producer price index (search) and the core measure to rise by 0.2 percent on the month and the data provides a prelude to Friday's key report on consumer inflation.

The Federal Reserve (search), which recently raised U.S. interest rates a quarter point to 1.25 percent to keep inflation at bay, is scrutinizing all fresh price information as it assesses the pace of monetary tightening needed as the economy powers ahead.

Energy prices fell 1.6 percent in June with gasoline down 5.2 percent, the largest drop for both measures since May 2003. The reversal was payback for May when energy prices had risen 1.6 percent and gasoline advanced 5.7 percent.

Finished food prices, another important component in the series, fell by 0.6 percent, after rising 1.5 percent in May.

Further back in the production pipeline cost pressures also appeared to be abating, with intermediate goods up 0.5 percent after climbing by 1.1 percent in May.