WASHINGTON, (Reuters) - U.S. consumer prices recorded their biggest increase in six months in October on rising gasoline costs and rents, suggesting a pickup in inflation that

A shopper walks down an aisle in a Walmart Neighborhood Market in Chicago in this September 21, 2011 file photo. REUTERS/Jim Young/Files

potentially clears the way for the Federal Reserve to raise interest rates in December.

The Labor Department said on Thursday its Consumer Price Index increased 0.4 percent last month after rising 0.3 percent in September. In the 12 months through October, the CPI advanced 1.6 percent, the biggest year-on-year increase since October 2014. The CPI increased 1.5 percent in the year to September.

Last month’s increase in both the monthly and year-on-year CPI was in line with economists’ expectations.

Underlying inflation, however, remained moderate. The so-called core CPI, which strips out food and energy costs, climbed 0.1 percent last month after a similar gain in September. That slowed the year-on-year increase in the core CPI to 2.1 percent from a 2.2 percent rise in September.

The Fed has a 2 percent inflation target and tracks an inflation measure which is currently at 1.7 percent.

The firming inflation backdrop and labor market that is approaching full employment are likely to encourage the U.S. central bank to raise borrowing costs at its Dec. 13-14 policy meeting.

The Fed this month left interest rates unchanged but said its monetary policy-setting committee “judges that the case for an increase in the federal funds rate has continued to strengthen.” It bank lifted its benchmark overnight interest rate last December for the first time in nearly a decade.

Inflation could push higher in the coming years if president-elect Donald Trump’s proposal to boost infrastructure and defense spending is implemented. The fiscal stimulus, against the backdrop of full employment, would entail a much faster pace of interest rate hikes than currently anticipated.

Last month, gasoline prices jumped 7.0 percent after rising 5.8 percent in September. Gasoline accounted for more than half of the increase in the CPI last month.

Food prices were unchanged for a fourth straight month. Food consumed at home declined for a sixth straight month.

Within the core CPI basket, housing continued its upward march in October. Rents increased 0.4 percent last month and owners’ equivalent rent of primary residence rose 0.3 percent after gaining 0.4 percent in September.

Medical care costs were unchanged for a second month as a rise in hospital services was offset by a decline in the cost of doctor visits. Prices for prescription medicine rose 0.2 percent, slowing from September’s 0.8 percent gain. There were increases in the prices of a range of other goods last month,

including new motor vehicles and apparel.