WASHINGTON (AP) — Consumer prices fell last month for the first time in a year because of a steep drop in gas costs. But Americans paid more for autos, clothes and hotel stays, driving prices outside of volatile food and energy costs up.

The Consumer Price Index fell 0.2 percent in June, the Labor Department said Friday. Gas prices fell 6.8 percent, the steepest decline in two and a half years.

After excluding volatile food and gas costs, core prices rose 0.3 percent. That was the second straight monthly gain and the largest back-to-back increase since the summer of 2008.

Many of the trends driving the increase in the core index are expected to fade by next year. New car prices rose 0.6 in June, after jumping 1.1 percent in May. Those increases reflect supply shortages stemming from Japan’s earthquake, which should ease in the fall.

“We expect a lot of the pickup in core inflation to be reversed, but that won’t happen until perhaps early next year,” said Paul Ashworth, an economist at Capital Economics.

Rising gas and food prices caused inflation concerns earlier this year. In the 12-month period from May 2010 to June 2011, consumer prices rose 3.6 percent. The yearly gain in the index was only 1.1 percent as recently as November.

Core prices have been much tamer. They increased only 1.6 percent in the past year. That’s below the Federal Reserve’s preferred target of 2 percent.

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.

Low inflation allows the central bank to keep the short-term interest rate they control at a record low near zero, where it has been since December 2008.

Oil prices have come down from their peak this spring, and gas costs have followed. The average national price per gallon was nearly $4 in early May. On Friday, a gallon of gas averaged $3.66 nationwide, according to AAA.

Food prices increased 0.2 percent, the smallest gain this year.

But other prices are going up. Clothing prices soared 1.4 percent in June, the most since March 1990. That comes after a 1.2 percent rise in May. The increase likely reflects higher cotton costs and more expensive clothing imports, in part because of the weaker dollar.

In the past month, cotton prices have plummeted 30 percent, Ashworth noted.

“We wouldn’t be surprised to see clothing prices eventually come back down a bit, although not until 2012,” Ashworth said.

Also driving core prices higher in June:

• a 3.0 percent jump in hotel rates, after a 2.9 percent increase in May.

• higher rents, which lifted housing costs 0.2 percent.

• a 0.2 percent increase in medical care costs, which pushed the total increase for the past year up 2.9 percent.

Federal Reserve chairman Ben Bernanke has said that recent price increases are likely to be temporary. High unemployment makes it unlikely that workers can press for more wages, which in turn makes it hard for companies to raise prices.

Fed policymakers expect core consumer inflation to average between 1.5 percent and 1.8 percent this year.

Many economists expect core prices to keep rising for several more months, possibly reaching 2 percent. That would make it harder for the Federal Reserve to take additional steps to stimulate the economy, for fear of sparking greater inflation.