U.S. producer prices rose faster than expected in April, government data showed on Thursday, driven by a surge in food costs.

The Labor Department said the Producer Price Index climbed 0.3 percent after declining 1.2 percent in March. Food prices rose 1.5 percent in April, the biggest increase since January 2008. Food costs rose on a record jump in egg prices, along with soaring prices for vegetables and meat.

Excluding food, the headline PPI would have increased 0.1 percent.

Analysts polled by Reuters had forecast a 0.1 percent rise in the overall index.

However, compared to the same period last year, prices received by producers tumbled 3.7 percent, the biggest decline since January 1950.

Core producer prices, excluding food and energy costs, rose 0.1 percent in April, matching market expectations. The core PPI was unchanged in March.

Compared to the same period a year ago, core producer prices were up 3.4 percent.

Energy prices fell 0.1 percent in April versus a 5.5 percent decline in March. Gasoline prices edged up 2.6 percent in April and residential natural gas fell 6.2 percent.

(Reporting by Lucia Mutikani; Editing by Neil Stempleman)