U.S. consumer prices rose 0.2% in May, with surging gasoline costs driving much of the increase.

The Labor Department said Thursday that the consumer price index climbed 2.8% last month from a year earlier, putting inflation on its fastest annual pace since February 2012. But core prices—which exclude the volatile food and energy categories—have risen a milder 2.2% over the past 12 months.

Inflation remains relatively tame, although it has picked up sharply this year, in large part due to more expensive oil. Gasoline prices climbed 1.7% in May and jumped 21.8% from a year ago.

Americans are also paying more for housing: shelter costs have risen 3.5% in the past year. And transportation services, which include auto repair and airfare, have increased 3.8%.

Read: April gain in U.S. consumer spending biggest in five months

Yet the prices of commodities other than food and energy have fallen 0.3% in the past year. This slower growth in core prices likely means that the Federal Reserve will raise interest rates only gradually. Fed officials are expected to raise rates on Wednesday for the second time this year.

Should core inflation accelerate, the Fed might move to tighten credit more aggressively. The challenge would be to do so without slowing growth so much as to create a downturn.

“With inflationary pressures still on a gradual upward trajectory, today’s readings shouldn’t alter the rate hike path of the Fed ahead of tomorrow’s expected rate increase,” said Katherine Judge, economist at CIBC Capital Markets, in a note.

Also read:

Annual inflation cools, but BoC core measure above 2%

Choosing inflation-linked over fixed-rate bonds