Consumers paid more for gas, food and clothes last month, pushing prices up by the most since the spring.
The Labor Department said Thursday that the Consumer Price Index rose 0.5 percent in July. That followed a drop of 0.2 percent in June.
Gas prices accounted for much of the swing. They increased a seasonally adjusted 4.7 percent after dropping sharply in June.
The core index, which excludes volatile food and energy, rose 0.2 percent. That's below the 0.3 percent rise in each of the previous two months.
Over the past 12 months, prices have risen 3.6 percent. That's equal to the 12-month increase in May and June. But core prices over the past 12 months have gone up 1.8 percent -- the largest increase in two years.
Clothing prices rose 1.2 percent in July. That was the third straight increase, reflecting higher cotton prices. Over the past 12 months, clothing costs have risen 3.1 percent, the largest annual increase since July 1992.
Higher rents and pricier hotel rooms have pushed the cost of housing up by the most in three years.
Food prices rose 0.4 percent. The cost of meat, dairy, coffee and fruits and vegetables all increased.
The Labor Department said Wednesday that core wholesale prices rose 0.4 percent in July, the most in six months. That's twice the increase in core consumer prices. The difference suggests that retailers are reluctant to pass on all their higher costs to consumers. That could restrain inflation going forward.
Higher gas and food costs sent consumer prices sharply higher this year, stoking inflation fears. But core prices, which exclude volatile food and energy costs, have been much tamer. The 1.8 percent annual increase reported in July is within the Federal Reserve's informal target range of between 1.5 percent and 2 percent.
Fed policymakers expect core consumer inflation to average between 1.5 percent and 1.8 percent this year.
Some inflation can be healthy for the economy because it encourages people to spend and invest rather than sitting on their cash. More spending drives corporate growth, which makes businesses more likely to hire people.
Oil and gas prices have fallen in recent weeks, in response to concerns that growth in the United States and Europe will be weak this year. Americans are also driving less, reducing demand for gasoline.
Falling oil and gas prices should help keep inflation in check. The average nationwide price of gas fell to $3.58 a gallon Wednesday, down about 9 cents from a month earlier.
Lower inflation gives the Federal Reserve more leeway to keep interest rates low and potentially engage in other efforts to boost the economy.
Last week, Fed policymakers said they will keep its benchmark short-term rate at nearly zero at least until mid-2013. Previously, the central bank had never given a clear time frame. It hopes the certainty of low rates will encourage consumers and businesses to borrow and spend more.
© Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.