WASHINGTON (Reuters) - The economy shrank at a 0.3 percent annual rate in the third quarter, its sharpest contraction in seven years as consumers cut spending and businesses reduced investment in the face of rising fears that recession was setting in.

The Commerce Department said the third-quarter contraction in gross domestic product was the steepest since the corresponding quarter in 2001 though it was slightly less than the 0.5 percent rate of reduction that Wall Street economists surveyed by Reuters had forecast.

More spending by the government partly offset a sharp retreat by consumers.

The third-quarter contraction was a striking turnaround from the second quarter’s relatively brisk 2.8 percent rate of growth. It occurred during financial market turmoil that has heightened worry about a potentially lengthy U.S. recession.

Consumer spending, which fuels two-thirds of U.S. economic growth, fell at a 3.1 percent rate in the third quarter -- the first cut in quarterly spending since the closing quarter of 1991 and the biggest since the second quarter of 1980. Spending on nondurable goods -- items like food and paper products -- dropped at the sharpest rate since late 1950.

“We are being held up here by government spending, which added 1.1 percentage points to GDP growth,” said Robert Brusca, chief economist with Fact And Opinion Economics in new York. “The GDP number doesn’t reveal the weakness because (of) the impact of international trade. ... it’s a warning how weak the economy is.”

Continuing job losses coupled with declines in the value of stocks, other investments and housing prices have put consumers under severe stress. The GDP report showed that disposable personal income dropped at an 8.7 percent rate in the third quarter -- the steepest since quarterly records on this component were started in 1947 -- after rising 11.9 percent in the second quarter when most of economic stimulus payments still were flowing.

U.S. stock index futures and the dollar extended gains on the better-than expected GDP data, while U.S. government debt prices extended losses.

Separately, the Labor Department said weekly claims for new unemployment benefits continued at a lofty 479,000 last week, a level that signals weak hiring prospects and is likely to intensify consumer anxiety.

Consumers cut spending on durable goods like cars and furniture at a 14.1 percent annual rate in the third quarter, the biggest cut in this category of spending since the beginning of 1987. Car dealers have said that sales have virtually stalled, in part because tight credit makes it hard for even creditworthy buyers to get loans.

Businesses also were clearly wary about the future, cutting investments at a 1 percent rate after boosting them 2.5 percent in the second quarter. It was the first reduction in business investment since the end of 2006. Inventories of unsold goods backed up at a $38.5-billion rate in the third quarter after rising $50.6 billion in the second quarter.

The third-quarter GDP number would have been worse except for a surge in federal government spending, which shot up at a 13.8 percent annual rate. That was more than double the second quarter’s 6.6 percent rate of increase and was the strongest since the second quarter of 2003 when the war in Iraq began.

Prices were still rising relatively strongly in the third quarter, with the personal consumption expenditures index up at a 5.4 percent annual rate, the sharpest since early 1990. Even excluding volatile food and energy items, core prices grew at a 2.9 percent rate, up from the second quarter’s 2.2 percent rise.

However, oil prices peaked in July and many commodity prices have begun to ease. The Federal Reserve indicated on Wednesday when it slashed interest rates again that its concern for the future was focused more heavily on weak growth than on inflation.