WASHINGTON (AP) — U.S. consumer prices rose slightly in May as higher energy costs were partly offset by cheaper food. The small increase comes after two straight declines, underscoring that American consumers are benefiting from mild inflation.

The consumer price index ticked up a seasonally adjusted 0.1 percent last month, only the second increase in seven months, the Labor Department said Tuesday. Consumer prices fell 0.4 percent in April, the largest decline in four years. In the past 12 months, prices have increased just 1.4 percent. That’s up from a 1.1 percent annual pace in April, which was the smallest in 2 ½ years.

Slow economic growth and high unemployment have kept wages from rising quickly. That’s made it harder for retailers and other firms to raise prices.

Still, tame inflation has helped consumers increase spending this year, despite slow income growth and higher Social Security taxes. It also makes it easier for the Federal Reserve to continue its extraordinary efforts to boost the economy.

And while inflation is low, economists say it isn’t low enough to alarm Fed policymakers. Tuesday’s report “won’t prevent the Fed from beginning to reduce its monthly asset purchases, probably beginning in September,” said Paul Ashworth, an economist at Capital Economics.

In May, higher natural gas and electricity costs pushed up energy prices 0.4 percent. Gas prices were flat. Food costs fell 0.1 percent, as grocery prices dropped by the most in almost four years.

Outside the volatile food and gas categories, core prices rose 0.2 percent in May, driven up by higher rents and rising prices for hotels, clothing and air fares. Core prices have increased 1.7 percent in the past 12 months, in line with the Federal Reserve’s inflation target of 2 percent.

The cost of health care is rising at a much slower pace than its historical norm, helping to limit inflation. The cost for prescription and nonprescription drugs fell 0.7 percent in May, the steepest decline on record. And the cost for medical services was unchanged in May.

In the past 12 months, overall health care prices rose just 2.2 percent, the smallest yearly increase for that category in more than 40 years.

Consumers have kept spending at a modest pace in recent months. Retail sales rose at a healthy clip in May from April, the Commerce Department said last week. Americans spent more on cars and trucks, home improvements and sporting goods.

Wholesale prices rose 0.5 percent in May, as gas and food costs increased, the Labor Department said last week. But in the past year they have risen just 1.7 percent.

Fed policymakers are meeting Tuesday and Wednesday to discuss the economy’s health and consider their next moves.

Steady job gains and resilient consumer spending have fueled intense speculation that the Fed may soon start reducing the pace of its monthly bond purchases. That’s caused heavy volatility in stock and bond prices.

The Fed is purchasing $85 billion a month in bonds to keep longer-term interest rates down. That’s intended to encourage more borrowing, investing and spending. The Fed says it will continue to buy bonds until the job market improves substantially.

The Fed also says it plans to keep the short-term interest rate it controls at a record low near zero until the unemployment rate falls below 6.5 percent, provided inflation remains under control. The unemployment rate ticked up in May to 7.6 percent, though it is down 0.6 percentage points in the past year.