The U.S. economy grew faster than previously estimated in the third quarter as exports and government spending provided a lift, but that boost is likely to be lost amid slowing global demand and a move towards tighter fiscal policy.

Gross domestic product expanded at a 3.1 percent annual rate, the Commerce Department said in its third estimate on Thursday, up from the 2.7 percent pace reported last month.

It was the fastest growth since late 2011 and also reflected a slightly better pace of consumer spending than previously estimated.

Economists polled by Reuters had expected GDP growth would be raised to a 2.8 percent pace. Exports grew at a 1.9 percent rate, rather than 1.1 percent.

With imports falling for the first time since the second quarter of 2009, that narrowed the trade deficit. Trade contributed 0.38 percentage point to GDP growth. The drop in imports is a sign of weak domestic demand.

Government spending was revised to a 3.9 percent growth rate from 3.5 percent, boosted by a rebound in state and local government outlays. It added three quarters of a percentage point to GDP growth in the third quarter.

The boost from exports is likely to be short-lived against the backdrop of a cooling global economy. Government will likely be a drag in the coming quarters amid belt tightening to trim the budget deficits.

About $600 billion in automatic government spending cuts and higher taxes could be pulled out of the economy in early 2013, and tip it back into recession unless an agreement is reached on less punitive plan.

While growth in consumer spending, which accounts for about 70 percent of U.S. economic activity, was raised by 0.2 percentage point to a 1.6 percent rate, that mostly reflected higher health care costs.

Business inventories were trimmed to $60.3 billion from $61.3 billion. Restocking by businesses contributed 0.73 percentage point to GDP growth.

Given the sluggish spending pace, some of the inventory accumulation might have been unplanned, suggesting businesses will need to liquidate stocks this quarter because of weak demand.

Excluding inventories, GDP rose at a revised 2.4 percent rate. Final sales of goods and services produced in the United States had been previously estimated to have increased at a 1.9 percent pace.