U.S. consumer prices rose for the first time in four months in February, but the pace of the increase was modest, resulting in the smallest annual gain in nearly 2-1/2 years.

The Labor Department said on Tuesday its Consumer Price Index increased 0.2 percent, lifted by gains in the costs of food, gasoline and rents. The CPI had been unchanged for three straight months.

In the 12 months through February, the CPI rose 1.5 percent, the smallest gain since September 2016. The CPI increased 1.6 percent on a year-on-year basis in January.

Excluding the volatile food and energy components, the CPI edged up 0.1 percent, the smallest increase since August 2018. The so-called core CPI had increased by 0.2 percent for five straight months.

In the 12 months through February, the core CPI rose 2.1 percent. The core CPI had increased by 2.2 percent for three consecutive months on an annual basis. Economists polled by Reuters had forecast the CPI and the core CPI edging up 0.2 percent in February.

The Federal Reserve, which has a 2 percent inflation target, tracks a different measure, the core personal consumption expenditures (PCE) price index, for monetary policy.

The core PCE price index increased 1.9 percent on a year-on-year basis in December after a similar gain in November. It hit the U.S. central bank's 2 percent inflation target in March last year for the first time since April 2012.

Slowing domestic and global growth are keeping inflation in check even as a tight labor market is driving up wages. Annual wage growth jumped 3.4 percent in February, the biggest increase since April 2009, from 3.1 percent in January.

A New York Fed survey of consumer expectations published on Monday showed a drop in inflation expectations in February.

In a wide-ranging interview with CBS's 60 Minutes news program, Fed Chairman Jerome Powell on Sunday reiterated the U.S. central bank's wait-and-see approach to further monetary policy tightening this year. Powell said the Fed did "not feel any hurry" to change the level of interest rates again.