WASHINGTON — Lower gas costs offset more expensive food and higher rents to keep a measure of U.S. consumer prices flat last month.

The Labor Department said Wednesday that food prices increased 0.2 percent in December from November. Rents and airline fares also rose. Gasoline prices fell a seasonally adjusted 2.3 percent.

The flat reading of the December consumer price index caps a year when inflation slowed. Consumer prices rose only 1.7 percent in 2012, down from 3 percent in 2011.

Food prices increased 1.8 percent last year, down from 4.7 percent in 2011. Gas prices rose just 1.7 percent last year. That followed annual gains of nearly 10 percent in 2011 and roughly 14 percent in 2010.

Excluding the volatile food and energy categories, core prices ticked up just 0.1 percent in December compared with November. And core prices rose only 1.9 percent in 2012. That’s below the Federal Reserve’s inflation target of 2 percent. And it’s lower than 2011’s increase of 2.2 percent.

Prices for household furniture, clothing and used cars declined in December from November.

Mild inflation leaves consumers with more money to spend, which is good for the economy. Lower inflation also makes it easier for the Fed to continue with its efforts to accelerate the economy. If the Fed were worried that prices are rising too fast, it might have to raise interest rates.

With job gains and economic growth steady but modest, many businesses are reluctant to raise prices for fear of losing customers. That’s helped keep inflation tame. Workers also aren’t able to demand higher wages when growth is weak. That limits their ability to pay more.

Price hikes will likely remain mild, economists say.

“It remains our view that core inflation has peaked ... and will continue to drift lower in coming quarters as weak global economic activity weighs on pricing power,” Joshua Shapiro, chief U.S. economist at MFR Inc., said in a note to clients.

Gas prices have fallen sharply in recent months after spiking this summer. Prices at the pump averaged $3.29 a gallon nationwide on Wednesday. That’s about the same as a month ago and well below summer prices that nearly touched $4 a gallon.

Prices are likely to stay low in the early months of 2013, based on a measure of wholesale prices reported Tuesday.

The producer price index, which measures price changes before they reach the consumer, fell for the third straight month in December. Wholesale food prices dropped by the most in 19 months, largely because of a sharp drop in beef and veal costs. Vegetable and cheese prices also declined.

Not everything was cheaper at the wholesale level. The cost of women’s and girls’ clothes jumped by the most in nine years. Fresh fruit prices also rose.

With inflation tame, the Fed has ramped up its efforts to boost growth. It decided last month to keep buying $85 billion a month in Treasurys and mortgage bonds in an effort to lower borrowing costs and encourage more spending.

The Fed also said last month that it planned to keep its key short-term interest rate at a record low even after unemployment falls to 6.5 percent — which it said might take three more years. Unemployment remains high at 7.8 percent.