WASHINGTON (AP) -- A sharp rise in gasoline costs drove up wholesale prices last month by the most in more than three years. But outside energy and food, price gains were mild.

The producer price index, which measures price changes before they reach the consumer, jumped 1.7 percent in August, the Labor Department said Thursday. The increase was mostly because gas prices soared 13.6 percent, the biggest gain in three years.

Food prices rose 0.9 percent, driven up by steep increases in the cost of eggs and dairy products.

In the past 12 months, wholesale prices have increased 2 percent, a mild gain and far below the recent peak of 7.1 percent in July 2011. Core wholesale prices have risen 2.5 percent in the past year, the same annual pace as in July.

Food prices are likely to rise further in the coming months as the Midwest drought has made corn, soybeans and other grains much more expensive. Sweet corn prices jumped 44 percent last month, the most in a year and a half.

Higher corn prices raise costs for many different foods on grocery store shelves. Corn is used to make everything from cosmetics to cereal, soda, cake mixes and candy bars. It is also used as a feed for cattle and hogs. That means more expensive corn can also push up beef and pork prices.

A measure of food prices in earlier stages of processing rose 2.4 percent last month, the biggest gain in about 18 months. The increase was mostly because the cost of animal feed rose.

Gas prices have rebounded after falling from nearly $4 a gallon in the spring. Prices at the pump averaged $3.87 a gallon nationwide Thursday. That's 17 cents higher than a month earlier.

But overall, economists aren't worried that inflation is rapidly accelerating. With U.S. economic growth weak and unemployment high, workers' wages are barely keeping up with inflation. That means consumers won't be able to pay much higher prices.

"We foresee little impetus for significant, sustained upside pressure on prices at the producer level," Joshua Shapiro, chief economist at MFR Inc., said in an email.

The government will issue its August report on consumer prices Friday. In July, consumer prices were unchanged, and rose only 1.4 percent in the previous 12 months. That's below the Federal Reserve's informal target of a 2 percent annual increase.

Low inflation means consumers have more money to spend, which helps the economy. It also gives the Federal Reserve more leeway to keep interest rates low in an effort to spur economic growth. If prices were to begin rising rapidly, the Fed might be forced to raise rates in response.

Most analysts expect the Fed to take new steps to boost economic growth at the end of a two-day meeting on Thursday. Those steps could include a third round of Treasury bond purchases. The goal of the purchases would be to lower interest rates and spur more borrowing and spending.

Fed Chairman Ben Bernanke said in a recent speech that high unemployment is "a grave concern" that causes "enormous suffering." Those remarks were seen by many economists as a sign that Bernanke was likely to take more action.