The United States economy, the world's largest, unofficially emerged from recession in the third quarter of the year, growing at a better-than-expected annualised pace of 3.5%.

The growth, spurred by rebounding consumer spending and investment in home-building, marked the first positive quarter since the second three months of last year. Economists had expected a figure of around 3.3% after a drop of 0.7% in the second quarter.

The return to growth means the US was in recession for four consecutive quarters, a better performance than Britain, which remains in recession after six quarters in a row of contraction.

However, in the US recessions are officially declared by the National Bureau of Economic Research. By its calculations, the US tipped into recession at the end of 2007 and it would probably require a lot more positive data before it declares the worst recession since the Great Depression of the 1930s to be over.

The US figured would translate to a quarter-on-quarter expansion rate of about 0.8%. Britain, by contrast, posted a 0.4% fall in gross domestic product over the same three months.

World stockmarkets and oil prices gained sharply on the number while the euro pushed higher against the dollar although the greenback gained against the yen.

The breakdown of the figures showed that consumer spending, which accounts for over two thirds of US economic activity, surged at a 3.4% rate in the third quarter, the fastest since the first quarter of 2007.

Rob Carnell, economist at ING Financial Markets in London, said the figures were boosted by spending on new cars in response to the US "cash for clunkers" programme.

Nevertheless he warned that with the programme due to end soon and investment spending still very weak, the quantity of spare capacity in the economy would weigh on investment for sometime, as would weak profits and tighter access to credit.

"Suggestions that the figure marks the end of the recession in the US, although technically correct, ignore the relatively low quality of the growth registered in this release. Such suggestions also ignore the likely soft fourth quarter that is now in the pipeline. The US economy is not out of the woods yet."