U.S. producer prices unexpectedly rose 0.7 percent in October as surging costs of natural gas and home heating oil outweighed cheaper gasoline, but prices outside of food and energy ticked lower, a government report showed on Tuesday.

Wall Street had expected October prices received by farms, factories and refineries to be flat after a roaring 1.9 percent gain the month before.

Outside of the volatile food and energy sectors, however, so-called core producer prices declined a surprise 0.3 percent in October despite economist forecasts for a 0.2 percent increase.

While gasoline prices fell 3.3 percent last month as the impact of Gulf Coast hurricanes Katrina and Rita waned, the largest residential natural gas increase in more than two years pushed overall energy prices up 4.1 percent. Residential natural gas prices rose 12.7 percent in October, while home heating oil costs climbed 12.3 percent.

The 12-month increase in producer prices eased to 5.9 percent, largely due to a 26.1 percent increase in the cost of finished energy goods.

A sharp decline in automobile prices helped depress core inflation in October. Passenger car prices fell 3.0 percent, their largest decline in four years, and light motor truck prices dropped 2.2 percent.