U.S. nonfarm productivity rebounded more strongly than expected in the second quarter, putting a lid on wage pressures and giving the Federal Reserve room to keep interest rates low for a while.

The Labor Department said on Friday productivity increased at a 2.5 percent annual rate after contracting at a revised 4.5 percent pace in the first quarter, which was the fastest decline since the fourth quarter of 1981.

Productivity, which measures hourly output per worker, was previously reported to have declined at a 3.2 percent rate in the first three months of the year.

Economists had forecast productivity rising at a 1.5 percent rate in the April-June period.

The rebound in productivity follows a bounce back in gross domestic product in the second quarter. The economy grew at a 4.0 percent rate after shrinking at a 2.1 percent pace in the first quarter.

A separate report from the Commerce Department showed a moderate gain in wholesale stocks in May and June, which could have an impact on the second-quarter GDP growth estimate, especially coming on the heels of a report this week showing a small rise in inventories of nondurable factory goods in June.

Wholesale inventories increased 0.3 percent in June after a downwardly revised 0.3 percent gain in May. Wholesale stocks in May were previously reported to have increased 0.5 percent.

The government in its advance second-quarter GDP report last week estimated inventories contributed 1.66 percentage points to growth.

The trend in productivity, however, remains sluggish. Compared to the second quarter of 2013, productivity increased 1.2 percent.

WEAK LABOR COSTS

Workers put in more hours in the second quarter, but with output rising, that lowered labor costs.

Unit labor costs, the price of labor per single unit of output, rose at a 0.6 percent rate. They had advanced at a revised 11.8 percent rate in the first quarter, the quickest since the fourth quarter of 2012, as a harsh winter depressed output.

The Fed is keeping an eye on wage growth as it ponders the future course of monetary policy.

"The key message here is that labor costs remain subdued and unlikely to represent a source of rising production costs and or inflationary pressures any time soon," said Anthony Karydakis, chief economic strategist at Miller Tabak in New York.

While the tame unit labor costs suggest the U.S. central bank should be in no hurry to start raising its benchmark overnight interest rate, which it has kept near zero since December 2008, other measures such as income and the employment cost index point to some firming of wage pressures.

In addition, there is growing anecdotal evidence that companies are raising wages. A compensation gauge produced by the National Federation for Independent Business is hovering at a seven-year high.

Unit labor costs were previously reported to have increased at a 5.7 percent rate in the first quarter and economists had expected them to rise at a 1.4 percent pace in the second quarter.

Compared to the second quarter of last year, unit labor costs rose 1.9 percent, showing that wage inflation remained benign. They had increased 2.6 percent in the first quarter.