The U.S. economy grew at an annual rate of 3.1 percent over the summer as consumers spent more and state and local governments added to growth for the first time in nearly three years. But the economy is likely slowing in the current quarter.

The Commerce Department’s third and final estimate Thursday of growth for the July-September quarter was revised up from its previous estimate of a 2.7 percent annual growth rate.