While businessmen have been complaining loudly about labor shortages for months, data from the government Thursday showed that wage gains trailed consumer prices in June.

The consumer price index rose a seasonally adjusted 0.1 percent in June compared with May. Core inflation, which excludes volatile food and energy prices, rose 0.2 percent, the Labor Department said Thursday.

Economists had expected both measures to rise by 0.2 percent. The lower-than-expected core inflation reflects the fact that the headline number was driven by higher energy prices, while the core figure was dragged down by price declines in furniture, clothing, and tobacco. Prices of hotel rooms fell 3.7 percent from the previous month. Oil prices have been up sharply.

Compared with a year ago, consumer prices are up 2.9%, the largest gain since February 2012. Core inflation rose a more modest 2.3% in June from a year ago.

Average hourly earnings were up 2.7% in June compared with a year earlier. As a result, average inflation-adjusted wages were about flat for the second month in a row.

Prices are unlikely to keep outpacing wage growth. If wage growth remains low, consumer spending will likely drag, slowing economic growth.

The slow pace of wage growth undermines the case many business leaders have been making for increased immigration to offset the alleged labor shortage. If anything, adding new workers is likely to slow wage growth even more, making a broader economic slowdown more likely.

The lower than expected core-inflation figure also implies that U.S. tariffs on steel and aluminum have not driven prices higher, as many critics of the Trump administration’s policies had predicted.