Key measures of US inflation and labor costs cooled significantly in recent months, adding to growing optimism that the economy may be able to avoid a recession.

The employment cost index, a broad gauge of wages and benefits, increased 1% in the second quarter, marking the slowest advance since 2021, according to Bureau of Labor Statistics figures released Friday.

A separate report showed the Fed’s preferred inflation gauge, the personal consumption expenditures price index, rose 3% from a year earlier in June, the smallest increase in more than two years. Core prices — which exclude food and energy and are regarded as a more reliable signal of underlying inflation — advanced by a less-than-expected 4.1%, also the least since 2021.

The PCE report also indicated consumer spending, adjusted for inflation, rose in June by the most since the start of the year, bolstering the message from data on Thursday that showed the US economy expanded at a solid pace in the second quarter.

Taken together, the figures add to hopes that the Federal Reserve can achieve a so-called soft landing: moderating inflation without big job losses, despite the steepest interest-rate hikes in a generation.

The S&P 500 opened higher and Treasury yields remained lower.

Though the ECI isn’t published with the same regularity as the earnings measure in the monthly jobs report, economists tend to prefer it because it’s not distorted by shifts in the composition of employment among occupations or industries.

Compared with a year earlier, employment costs were up 4.5%, marking the weakest pace of increase since the first quarter of 2022. Still, that’s well above the typical pace prior to the pandemic. Wages and salaries for civilian workers rose 4.6%, the slowest advance since the end of 2021.

The deceleration in wage growth was relatively broad-based across industries. Growth in benefit costs also moderated.

While hiring remains robust, various measures of wage growth have slowed in recent months in tandem with a deceleration in broader inflationary pressures. Ongoing strength in the labor market has been key to the economy’s resilience despite rapid interest-rate increases.

A separate report Friday showed US consumer sentiment rose in July to the highest level since 2021, and fewer consumers blamed inflation for eroding living standards.

Fed officials have singled out service-sector inflation in particular as a category they believe remains elevated due to tight labor markets. Price increases in that category, excluding housing and energy, rose 0.2% in the latest PCE report, similar to May’s increase.

By some metrics, wage growth is finally outpacing inflation, bolstering Americans’ purchasing power. Fed Chair Jerome Powell suggested at a July 26 press conference that the ECI data, along with upcoming reports on consumer prices, would factor into the central bank’s decision about whether to continue raising rates later this year.

“A data-dependent Fed will see mixed results in today’s reports. Inflation and labor compensation are moderating, but consumers (and the economy) appear to be picking up steam,” Sal Guatieri, senior economist at BMO Capital Markets, said in a note.

--With assistance from Jordan Yadoo.

This article was provided by Bloomberg News.