Wholesale prices rose last month for the first time since March on higher costs for food and passenger cars and trucks.
Still, the increases were modest and show that the weak economy isn't spurring widespread price rises.
The Labor Department said Tuesday that the Producer Price Index, which measures price changes before they reach the consumer, rose by 0.2 percent in July, after three months of declines. The rise matched Wall Street economists' forecasts, according to a survey by Thomson Reuters.
Excluding volatile food and energy costs, so-called "core" producer prices rose by 0.3 percent in July, the ninth straight increase. Core prices have risen by 1.5 percent in the past year.
The report comes after the Labor Department said Friday that consumer prices also rose in July for the first time in four months. The two reports may ease fears that the economy is about to experience deflation, a widespread and painful drop in prices and wages.
One big driver in higher producer prices was fresh and dry vegetables, which jumped in price by 9.8 percent, the most since March. Peas jumped by almost 81 percent, the most since October 2007. Tomatoes, which have been volatile for much of this year, soared by 68.6 percent, the most since March.
Egg prices rose in July by 19.4 percent, the most since April 2009.
Another big driver of the higher index was a 1.5 percent rise in the price of pickup trucks, SUVs, minivans and cargo vans. That was the biggest increase since January.
Over the past year, producer prices have risen by 4.2 percent, above June's figure but down from this spring, when the index increased by more than 5 percent in March, April and May.
Tame inflation allows the Federal Reserve to keep the key interest rate it controls at a record low of nearly zero percent in an effort to bolster economic growth. The Fed usually fights rising inflation by raising rates.