U.S. producer prices fell unexpectedly in March and also notched the largest year-over-year decline since 1950 as energy prices slipped, government data on Tuesday showed.

The Labor Department said the seasonally adjusted index for prices paid at the farm and factory gate fell by 1.2 percent last month versus a 0.1 percent gain in February.

Analysts polled by Reuters had forecast producer prices would be unchanged in March.

Compared with the same period last year, producer prices were 3.5 percent lower, the largest decline since a 3.9 percent fall in 1950, the Labor Department said.

Core producer prices, which exclude food and energy costs, were unchanged in March compared with a forecast for a 0.1 percent rise. The core producer price index stood 3.8 percent higher measured against the same month last year.

The Labor Department noted that among finished goods, energy prices turned down by 5.5 percent last month after rising 1.3 percent in February. They were 25.4 percent lower on a year-over-year basis. Gasoline prices fell 13.1 percent in March and were 50.7 percent lower compared with a year ago.

(Reporting by Alister Bull; Editing by Chizu Nomiyama)