Prices in the metropolitan area edged up last month compared with a year ago on the higher cost of residential rents.

The federal Bureau of Labor Statistics reported Tuesday that its consumer price index for the 31-county region that includes Long Island rose 0.1 percent in February compared with a year earlier.

Rents for apartments and other residences increased 3.1 percent last month compared with February 2014. The overall cost of shelter in the region was up 2.3 percent, year over year.

Grocery prices climbed 3.2 percent in February compared with a year ago.

Clothing was up 4.5 percent and medical care rose 3.7 percent.

advertisement | advertise on newsday

These price gains were offset by steep declines in the cost of some energy products.

Gasoline prices were off 35.1 percent compared with February 2014. Natural gas prices fell 20 percent in the same period. Both were the largest year-over-year declines since 2009.

However, the cost of electricity increased 6.2 percent last month compared with February 2014.