Updated

A rise in food and gas costs drove a measure of wholesale prices in May. But outside those volatile categories, inflation was mild.

The Labor Department said the producer price index rose 0.5 percent in May from April, nearly offsetting a 0.7 percent decline in April from March. Gas prices rose 1.5 percent last month, and food costs increased 0.6 percent.

The index, which measures price changes before they reach the consumer, has increased just 1.7 percent in the 12 months ending in May. That's up from a 0.6 percent year-over-year increase in April, the smallest in 10 months.

Core prices, which exclude the food and energy, rose just 0.1 percent in May. They are up 1.7 percent in the past year, below the Federal Reserve's 2 percent inflation target.