A surge in inventory-building and robust exports propelled U.S. economic growth ahead at the fastest rate in four years during the third quarter, the government reported on Thursday, though the pace of expansion already is waning.

Gross domestic product that measures total production within U.S. borders climbed at a revised 4.9 percent annual rate instead of 3.9 percent reported a month ago. It was the strongest quarterly growth rate since the third quarter of 2003 when GDP surged at a 7.5 percent rate and slightly exceeded Wall Street economists' forecast for a 4.8 percent rate of increase.

The department revises its GDP figure twice after its initial estimate and will publish its final figure for third-quarter performance on December 20. A slumping housing sector and waning consumer confidence is predicted to sap fourth-quarter growth and analysts say that risks are rising for a recession next year.

Companies built up inventories twice as fast during the third quarter as the government had estimated a month ago - at a $32.9-billion annual rate instead of $15.7 billion. Higher inventories add to growth and likely reflect stockpiling ahead of the Thanksgiving-to-Christmas holiday sales season but they can be a drag on future performance if sales do not meet expectations.

(Reporting by Glenn Somerville, editing by Andrea Ricci)