The U.S. economy grew at a solid rate of 2.6 percent in the final three months of last year, helped by the fastest consumer spending since the spring of 2016 and a big rebound in home construction.

The Commerce Department says the fourth quarter advance in the gross domestic product, the country's total output of goods and services, followed gains of 3.1 percent in the second quarter and 3.2 percent in the third quarter. The latest slowdown reflected a worsening trade deficit and less growth in inventory restocking by companies.

For all of 2017, the economy grew 2.3 percent. That is a significant improvement from a 1.5 percent gain in 2016 but little changed from the modest 2.2 percent average growth rate turned in since the Great Recession ended.