U.S. business inventories (search) grew by more than expected in July and the previous month was revised higher, government data showed on Wednesday, delivering the strongest two-month performance in nearly five years.

The Commerce Department (search) said July business inventories climbed 0.9 percent to $1.247 trillion while sales rose 0.6 percent.

June inventories were also revised up, to a 1.1 percent increase from a previously reported 0.9 percent gain, to give a two-month advance of 2.0 percent. A Commerce Department official said this was the strongest since a matching increase in November and December 1999.

"Conditions are mixed across industries. But by and large, this is something that we had counted on — inventories, with production and jobs — to boost growth and it's coming through," said Steven Wieting, senior economist at Citigroup Global Markets.

June sales were revised to a 0.2 percent gain from an initially reported 0.1 percent advance.

Wall Street analysts polled by Reuters had forecast a 0.8 percent rise in July inventories.

Economists see rising inventories either as a sign of confidence in future demand or as a result of an unexpected decline in sales which has led to involuntary stock building.

Deciding which of these interpretations is the case is helped by a sense of whether stocks are lean by historical standards from looking at the inventories-to-sales ratio.

This measure of the number of months it would take to deplete stocks at the current rate of sales advanced to 1.32 months from 1.31 months in June.

"You can see a mild increase in the inventory-to-sales ratio. So while some of the month-to-month change in inventories has been unintentional, overall you have got to think of the inventory build as intentional," Wieting said.

Also, business sales on a 12-month basis have risen by 9.9 percent while inventories gained 6.4 percent, in a further indication that restocking reflects healthy conditions.

At a more detailed level within the report, retail inventories rose 0.6 percent in July while retail sales gained 0.7 percent.

Inventories at motor vehicle and parts dealers climbed 1.8 percent as sales mounted 2.2 percent after shrinking 3.7 percent the previous month. The industry has struggled to maintain high sales while reducing buyer incentives.

Earlier this month, the Commerce Department said wholesale inventories (search) climbed 1.3 percent in July, thanks in large part to a record increase in stocks of petroleum products, while wholesale sales gained 0.5 percent.