US producer prices rebounded more sharply than expected in June after a dip in May, largely driven higher by energy prices, according to government data.

The Labor Department said its producer price index rose 0.4% in June, double the increase expected by analysts.

The PPI, an indicator of prices paid by producers of goods and services, fell 0.2% in May, the first decline since August last year. It rose 0.6% in April.

Leading the June increase were surging energy prices, up 2.1%, the largest gain in more than a year. Petrol prices leaped 6.4% in the month that kicks off the summer holiday driving season.

Food prices fell 0.2%, their second consecutive monthly decline. Excluding food, energy and trade, sectors that can be volatile, core PPI rose 0.1%, the department said. 

Year-over-year, inflationary pressures eased. The PPI rose 1.9% in June, after a 2.0% gain in May.

"We see clear upside risk to the core PPI over the next few months," said Ian Shepherdson, chief economist at Pantheon Macroeconomics.

"The underlying economic story here, we think, is that firms are expecting to have to pay rather higher wages and are seeking offsetting price increases," Mr Shepherdson added.

Producer inflation has been gradually building as the economy recovers from the severe 2008-2009 recession.

The Federal Reserve, with a dual mandate of price stability and maximum employment, is closely tracking price rises. Federal Reserve Chair Janet Yellen, in testimony to Congress yesterday, said that though inflation has moved up in recent months, it remained below the Fed 2.0% target over the long run.

The Fed's preferred inflation measure, the personal consumption expenditures price index, stood at an annualized 1.8% in May.