Home construction also rose, and state and local governments spent at their fastest pace in four years. But businesses spent less on equipment, federal spending fell and consumers spent at a slower pace. All are cautionary signs for the final three months of the year.
Overall, growth increased in the third quarter from a 2.5 percent annual rate in the April-June period to the fastest pace in a year, the Commerce Department said Thursday.
The third-quarter growth was nearly a full percentage point stronger than most economists had predicted. Analysts noted that much of the unforeseen strength came from a buildup in company inventories. That suggests that businesses overestimated consumer demand.
Restocking contributed 0.8 percentage point to growth - double its contribution in the second quarter.
Sal Guatieri, an economist at BMO Capital Markets, predicts that companies will cut back on restocking in the October-December quarter. He thinks less stockpiling, along with the effects of the shutdown, will slow growth to an annual rate below 2 percent this quarter.
Consumer spending weakened to a 1.5 percent annual growth rate from a 1.8 percent rate in the previous quarter. It was slowed by flat spending on services. This category includes everything outside manufacturing and makes up about two-thirds of all purchases. One reason was a steep drop in utility spending, possibly because of an unseasonably cool summer.
By contrast, consumer spending on goods surged at a 4.3 percent annual rate, the fastest in a year and a half. The gain was led by 7.8 percent annual growth in spending on autos and other long-lasting manufactured goods.
Spending by consumers is critical to growth because it drives roughly 70 percent of economic activity. Higher taxes this year and slow wage growth have weighed on consumers since the start of the year.
Exports rose at a 4.5 percent rate in the third quarter, helped by stronger economies overseas. Still, businesses cut back on investment in equipment by the most in a year.
Overall government activity grew at a slight 0.2 percent rate, reflecting a 1.5 percent rise in state and local government spending - the best showing since the spring of 2009. Federal government spending dropped again, falling at a 1.7 percent annual rate.
Analysts say the shutdown could cut more than half a percentage point from annual growth in the October-December quarter. The shutdown cost the U.S. economy an estimated $24 billion, according to Beth Ann Bovino, an economist at Standard & Poor's.