Andrew Harrer | Bloomberg | Getty Images

U.S. consumer prices recorded their biggest increase in more than three years in April as gasoline and rents rose, pointing to a steady inflation build-up that could give the Federal Reserve ammunition to raise interest rates later this year.

The Labor Department said on Tuesday its Consumer Price Index increased 0.4 percent last month, the largest gain since February 2013, after rising 0.1 percent in March. That took the year-on-year increase in the CPI to 1.1 percent from 0.9 percent in March. There were also increases in medical care and food prices. Economists polled by Reuters had forecast the CPI gaining 0.3 percent last month and advancing 1.1 percent from a year ago. The so-called core CPI, which strips out food and energy costs, rose 0.2 percent after climbing 0.1 percent in March. In the 12 months through April, the core CPI increased 2.1 percent after increasing 2.2 percent in March.

The Fed has a 2 percent inflation target and tracks an inflation measure which is currently at 1.6 percent. The rise in prices in April is likely to be welcomed by Fed officials who last month softened their language on inflation at the end of a regular meeting, noting that it continued to run below target because of "earlier declines in energy prices and falling prices of non-energy imports." Financial markets do not expect the Fed to hike rates again before September, given sluggish growth at the beginning of the year. The U.S. central bank lifted its benchmark overnight interest rate in December for the first time in nearly a decade and policymakers have forecast two more rate hikes this year. While data on April retail sales suggest economic growth regained steam early in the second quarter, a slowdown in payrolls gains last month and a recent spike in new applications for unemployment benefits have raised some concerns about the labor market's health. In April, gasoline prices jumped 8.1 percent, the largest gain since August 2012, adding to March's 2.2 percent increase. Food prices rose 0.2 percent after falling 0.2 percent in March.