U.S. worker productivity fell sharply in the second quarter and on an annual basis posted a record decline, the Labor Department said on Tuesday.

Nonfarm productivity, which measures hourly output per worker, fell at 4.6% annualized rate last quarter, after having declined by 7.4% in the first three months of the year, the report showed.

Economists polled by Reuters had expected productivity would decline at a 4.7% rate in the April-June period.

Productivity fell at 2.5% pace from a year ago.

Large shifts in the composition of the workforce in the wake of the COVID-19 pandemic have made it harder to measure underlying productivity growth, which some economists put at about 1.0% or less, making the Federal Reserve's fight against inflation more difficult.

Hours worked increased at a 2.6% rate in the second quarter.

Unit labor costs - the price of labor per single unit of output - accelerated at a 10.8% rate. That followed a 9.3% expansion rate in the first quarter.

Unit labor costs increased at a 9.5% rate from a year ago. An acute shortage of workers is boosting wage growth. There were 10.7 million job openings at the end of June.

Hourly compensation rose at a 5.7% rate in the second quarter. Compensation increased at a 6.7% rate compared to the second quarter of 2021.

(Reporting by Dan Burns; Additional reporting by Lindsay Dunsmuir; Editing by Paul Simao and Mark Porter)