A big drop in the cost of gasoline in July contributed to the smallest rise in consumer prices in eight months, providing a hopeful sign that inflation is easing.

Consumer prices, which had been surging earlier in the year, edged up a tiny 0.1 percent last month, the smallest advance since prices were flat last November, the Labor Department reported Wednesday. Core inflation, which excludes volatile energy and food, was also well-behaved, rising by just 0.2 percent, the same as June.

Both increases were in line with Wall Street expectations and should bolster hopes that declining inflation pressures will give the Federal Reserve room to cut interest rates if needed to deal with the recent turbulence in stock and credit markets.

At its meeting last week, the Fed continued to state that its biggest worry was that inflation pressures will not ease. However, hopes for a Fed rate cut, possibly as soon as September, have been growing since that time given a global sell-off of stocks spawned by worries that spreading credit problems could derail the current economic expansion.

The report on the Consumer Price Index, the most closely followed inflation barometer, showed that consumer prices have been rising at a seasonally adjusted annual rate of 4.5 percent so far this year, up from a 2.5 percent increase in prices for all of 2006.

However, that acceleration has been concentrated in energy and to a lesser extent food prices, which have been pushed higher because of growing demand for corn to produce ethanol.

Energy prices, which rose 2.9 percent for all of 2006, have been soaring at an annual rate of 21.3 percent through the first seven months of this year. Food costs have been rising at a rate of 5.7 percent this year, compared to an increase of 2.1 percent for all of last year.

Those sharp increases so far have not caused more widespread inflation troubles. Core inflation, which excludes food and energy, is up 2.3 percent so far this year, even better than last year's 2.6 percent increase.

Investors are hoping the Fed will see the improvement in core inflation as evidence that despite the big increases in energy costs, overall inflation pressures have remained contained. However, some analysts believe the Fed, which has not changed rates in more than a year, may want to wait for further evidence of declining inflation before its considers actual rate cuts.

The Fed has added billions of dollars to the U.S. banking system in the past several days, in an effort to keep its target for a key short-term interest rate from rising and also to assure investors that it was keeping close tabs on the market turmoil.

For July, energy prices fell by 1 percent. It was the second straight decline in energy costs and was the biggest one-month drop since January.

Food costs were up 0.3 percent, down from a 0.5 percent jump in June. The slowdown was helped by falling prices for beef, poultry vegetables.

In other areas, clothing costs increased by 0.4 percent but that rise followed four straight months of falling prices for clothes. The price for new cars and airline tickets both showed no gains in July but medical care, always one of the fastest rising price areas, increased by 0.6 percent, the biggest gain in six months.