U.S. consumer prices rose 0.2% last month, driven by increases in costs for food, shelter and gasoline, the Labor Department reported Tuesday. 

The Consumer Price Index was up 1.5% over the past 12 months, the Labor Department's Bureau of Labor Statistics said in a press release. Economists had estimated a 0.2% increase for the month, and 1.6% over the past year, according to data provider FactSet. 

Excluding food and energy items, whose prices can be volatile, the consumer price index rose by 0.1%, a slowdown from January's 0.2% increase. Economists had projected a 0.2% increase for February. 

A separate report on Monday showed that consumers now see inflation slowing in the years ahead for the first time since early 2018, adding to signs that the Federal Reserve can avoid raising interest rates in the near future as the economy slows. The central bank uses interest-rate increases to tamp down the pace of business and household borrowing, and thus to keep the economy from overheating and inflation in check. 

"With the Fed already comfortably on hold for the time being, there is no near-term policy implication from today's print," Eric Winograd, senior economist at the money manager Alliance Bernstein. "The biggest question remains whether a strong labor market will eventually feed through to higher inflation."

Food prices surged by 0.4% last month, the most since May 2014, pushed up by costs for fresh vegetables, nonalcoholic beverages and cereal and bakery products, according to the Bureau of Labor Statistics.

The gasoline-price index climbed 1.5%, following three consecutive monthly declines.

But prices fell for recreation, medical care, new vehicles and used cars and trucks, according to the press release. 

A report last week showed that the U.S. unemployment rate fell last month to 3.8%, close to the lowest half century. Some economists and business executives have expressed concern that a scarcity of qualified workers will force employers to pay up for new recruits, leading to an acceleration of wage costs that will eventually translate to higher consumer prices. 

Ian Shepherdson, chief economist at the forecasting firm Pantheon Macroeconomics, said in a report Tuesday that he expects inflation to tick up to about 2.5% by the end of this year. 

"At that point, we think wage growth will be at or above 4%, posing awkward questions for the Fed if rates have remained at their current level," Shepherdson wrote.