U.S. consumer prices rebounded less than expected in April as rising costs for gasoline and rental accommodation were tempered by a moderation in health-care prices, pointing to a steady buildup of inflation.

The Labor Department said on Thursday its Consumer Price Index rose 0.2 percent after slipping 0.1 percent in March. In the 12 months through April, the CPI increased 2.5 percent, the biggest gain since February 2017, after rising 2.4 percent March.

Excluding the volatile food and energy components, the CPI edged up 0.1 percent after two straight monthly increases of 0.2 percent. The so-called core CPI rose 2.1 percent year-on-year in April, matching March's increase.

Economists had forecast the CPI rebounding 0.3 percent in April and the core CPI climbing 0.2 percent.

The Federal Reserve tracks a different inflation measure, which is now flirting with the U.S. central bank's 2 percent target. The personal consumption expenditures price index excluding food and energy accelerated to 1.9 percent year-on-year in March as last year's big declines in the price of cell phone service plans dropped out of the calculation.

Economists expect the core PCE price index, which had increased 1.6 percent in February, to breach its target in May.

Gasoline prices rebounded 3.0 percent in April after tumbling 4.9 percent in March.

Further increases are likely after crude oil prices jumped to 3-1/2-year highs on Wednesday in the wake of President Donald Trump's decision on Tuesday to pull the United States out of an international nuclear deal with Iran.