WASHINGTON (Reuters) - The U.S. economy grew at its fastest pace in two years in the third quarter as a surge in soybean exports and a rebound in inventory investment offset a slowdown in consumer spending.

Gross domestic product increased at a 2.9 percent annual rate after rising at a 1.4 percent pace in the second quarter, the Commerce Department said on Friday.

That growth rate was the strongest since the third quarter of 2014 and beat economists’ expectations for a 2.5 percent expansion pace. Business investment improved last quarter, though spending on equipment remained weak.

But with exports and inventories accounting for almost half of the increase in output, economists warned the growth spurt would likely be temporary. Still, the data helped dispel any lingering fears the economy was at risk of stalling. Over the first half of the year, growth had averaged just 1.1 percent.

“While the economy may not be ready to take off, today’s GDP suggests the economic expansion is not at risk of ending,” said David Donabedian, the chief investment officer of Atlantic Trust Private Wealth Management in Baltimore.

Coming ahead of a Federal Reserve policy meeting next week, economists said the data was unlikely to change views that the U.S. central bank would wait until December, after the Nov. 8 presidential election, to raise interest rates.

The labor market is near full employment and price pressures have been steadily increasing, raising confidence that inflation will gradually move towards the Fed’s 2.0 percent target.

Slideshow ( 3 images )

Less than two weeks before the election, the GDP report was seen as bolstering Democratic presidential nominee Hillary Clinton, who has positioned herself as the best candidate to continue the more than six years of growth under President Barack Obama.

“This is good news for the Clinton campaign, which has tied itself closely to the Obama administration’s record on the economy,” said Robert Murphy, an economics professor at Boston College.

Clinton’s campaign team welcomed the growth pick-up and warned that policies proposed by Republican candidate Donald Trump would “would take us backwards.” Trump’s campaign team described the growth numbers as “dismal” and said they underscored the need for change.

U.S. financial markets were initially little changed after the publication of the mixed data, but U.S. stocks ended lower after the Federal Bureau of Investigation said it would review additional emails that have surfaced related to Clinton’s use of a private email server to determine whether they contain classified information. [.N]

U.S. Treasury yields also ended slightly lower and the dollar fell against euro and the yen.

Slideshow ( 3 images )

CONSUMER SPENDING SLOWS

Consumer spending, which accounts for more than two-thirds of U.S. economic activity, supported the economy in the third quarter by increasing at a 2.1 percent rate, but down from the second quarter’s robust 4.3 percent pace.

With a tightening labor market generating steady increases in wages, spending could accelerate in the fourth quarter.

Data on Friday from the Labor Department showed worker compensation rose 0.6 percent in the third quarter after a similar gain in the second quarter, leaving the year-on-year gain at 2.3 percent. A third report, however, showed consumer sentiment fell in October.

“Car sales have plateaued and election uncertainty may have caused some consumers to pull back,” said Curt Long, chief economist at the National Association of Federal Credit Unions in Arlington, Virginia. “But given the strength of the labor market, the economy should continue along its present path of slow-but-steady growth.”

A surge in soybean exports after a poor soy harvest in Argentina and Brazil helped to shrink the U.S. trade deficit in the third quarter, giving a lift to growth.

U.S. soybean exports surged to a record 1.936 billion bushels during the 2015/16 marketing year that ended on Aug. 31, as harvests in key competitors Brazil and Argentina were hit by weather problems, forcing importers to buy more U.S. supplies than planned.

Economists said that soybean-driven export growth spurt could reverse in the fourth quarter, but they also noted that exports of capital and consumer goods have been growing strongly in recent months.

Overall exports increased at a 10 percent rate, the biggest rise since the fourth quarter of 2013. As a result, trade contributed 0.83 percentage point to GDP growth after adding a mere 0.18 percentage point in the April-June quarter.Businesses increased spending to restock after running down inventories in the second quarter. Businesses accumulated inventories at a $12.6 billion rate in the last quarter, contributing 0.61 percentage point to GDP growth.

Spending on nonresidential structures, which include oil and gas wells, increased at a 5.4 percent rate, the fastest pace since the second quarter of 2014, after falling in the second quarter.

Business spending on equipment slipped at a 2.7 percent rate, dropping for a fourth straight quarter. While the pace of decline has been ebbing as oil prices stabilize and the dollar’s rally gradually fades, a strong turnaround is unlikely in the near-term.

Heavy machinery maker Caterpillar CAT.N this week reported a 49 percent drop in third-quarter profit from a year ago and lowered its full-year revenue outlook for the second time this year. Caterpillar said demand for new heavy machinery had been undercut by an "abundance" of used construction equipment, a "substantial" number of idle locomotives and a "significant" number of idle mining trucks.

Investment in residential construction fell for a second straight quarter, while spending by the government bounced back.