WASHINGTON — The U.S. economy expanded at a 2.8 percent annual rate from July through September, a surprising sign of strength ahead of the 16-day partial government shutdown. Exports rose, businesses stocked up, home construction increased and state and local governments spent at the fastest pace in four years.

The Commerce Department says growth increased from a 2.5 percent annual rate in the April-June period to the fastest pace in a year.

Consumers stepped up spending on goods. But overall spending weakened from the second quarter because service spending was essentially flat, in part because of a cooler summer that lowered utility spending.

The third-quarter outcome was nearly a full percentage point stronger than most economists had predicted. Analysts expect the shutdown will slow growth in the October-December quarter.