U.S. consumer prices climbed 0.4% in March, an increase caused mostly by higher costs for gasoline, electricity and shelter.

The Labor Department said Wednesday that the consumer price index rose a healthy 1.9% last month from a year ago, a sharp jump from the annual pace of 1.5% in February.

Inflation has been relatively modest even as the job market has strengthened and wage gains have accelerated over the past several years. The Trump administration has been highlighting the meager inflation as the president calls on the Federal Reserve to cut a key short-term interest rate.

But consumer prices in March suggested that the Fed can remain patient, as the figures were essentially near its 2% target.

"Overall, the March CPI data is another month of goldilocks inflation," said Leslie Preston, a senior economist at TD Bank. "Not too hot that the Fed needs to reevaluate its pause, and not so cold that it needs to consider easing policy."

Still, inflation in the form of commodity prices for gasoline and electricity roared in March, eating into wage growth. Average hourly wages have increased 1.3% in the past year, down from an annual gain of 1.9% in February.

Roughly 60% of inflation last month came from a 3.5% increase in energy prices.

Excluding the volatile energy and food categories, core prices increased 0.1% in March and 2% from a year ago.

Housing costs are also increasing faster than overall inflation, surging 3.4% from a year ago. But prices for clothing and medical care commodities has fallen over the past year, while inflation has been slight for new vehicles and used cars and trucks.

Inflation has become a politically sensitive issue in recent weeks as President Trump has announced plans to nominate Stephen Moore and Herman Cain to serve on the Fed's board of governors. The Fed's mandate is to keep inflation near a 2% target, meaning prices increase just enough to encourage spending but not enough to destabilize the economy.

Trump has favored a stiff cut to a key short-term rate by the Fed, in hopes that it boosts economic growth. Both Moore and Cain are perceived by economists and aides as likely adhering to Trump's wishes should they join the Fed, even though the central bank is supposed to set rates free from political influence.

The Trump administration's key argument that the Fed has erred is the low level of inflation. The central bank increased its key short-term rate — which sets the interest that banks charge each other— four times last year. White House officials argue that there is effectively no inflation because of the rate increases, so rates should be reduced instead. Fed officials have indicated that they plan to keep rates unchanged this year.

"There's no inflation out there, so I think the Fed's actions were probably overdone," Larry Kudlow, the top White House economic adviser, told CNBC at the end of March.