Consumer prices in the metropolitan area were 1.6 percent higher last month than a year ago.

The federal Bureau of Labor Statistics reported on Friday that its consumer price index for the 31-county region that includes Long Island climbed on the higher costs of housing and food in July compared with July 2016. It was the smallest increase since December, when the index rose more than 2 percent from a year earlier.

Martin Kohli, the bureau’s chief regional economist, said residential rents and groceries were key factors behind the annual price rise through July. Last month, residential rents were 2.5 percent higher than a year earlier, he said.

Grocery prices advanced 1.3 percent.

In addition, the cost of gasoline continued to rise, up 7.5 percent from July 2016.

Prices for electricity and natural gas rose 1.7 percent and 9.6 percent, respectively, year over year.

The cost of medical care was up 1.7 percent.

advertisement | advertise on newsday

These increases were partially offset by education and communication costs, which declined 0.5 percent, year over year. The category includes college tuition, postage, telephone services, computer software and accessories.

Household furnishings and operations were down 0.9 percent. The category includes furniture and home repairs.

From June to July, the price index fell 0.2 percent. The last time prices fell month-to-month was July 2016.

Nationwide, the price index rose 1.7 percent last month compared with a year earlier, on the higher costs of natural gas, prescription and over-the-counter medicine, and fuel oil.

From June to July, the national price index rose 0.1 percent.

Some economists said July’s price index was further proof that inflation remains in check.

“Underlying inflation in the U.S. economy is increasing very gradually,” James Bohnaker, an economist with the forecasting firm IHS Markit in Cambridge, Massachusetts, said in a report. “Inflation is tame across the board.”

He and others predicted the Federal Reserve System’s Federal Open Market Committee would postpone raising short-term interest rates until later this year because inflation remains below the committee’s ideal 2-percent target.

Bohnaker said the Fed would forgo “another rate hike until December.”