The American economy moved into a higher gear last quarter, expanding at an annual rate of 2.9 percent and riding continued strength among consumers and a better performance in global trade.

The Commerce Department’s report on the nation’s gross domestic product, released Friday, is the next-to-last snapshot of the overall economy before voters go to the polls on Nov. 8. Americans will also get to gauge the economic fortunes of the nation from the monthly unemployment figures to be released on Nov. 4.

While the pace of economic growth in the third quarter fell well short of previous achievements, the latest data represented a significant improvement from the first half of 2016 and the best quarterly advance in two years. Economists also said the gains were probably strong enough to reassure Federal Reserve policy makers that it was safe to raise the benchmark interest rate when they meet in December.

“This is a good, solid number,” said Gus Faucher, deputy chief economist at PNC Financial Services in Pittsburgh. “The economy is growing at a decent clip. Consumer spending will continue to lead growth, and the fundamentals there remain positive.”