The economy snapped out of a sluggish spell and grew at a faster-than-expected 3.5 percent pace in the final quarter of last year as consumers ratcheted up spending despite a painful housing slump.

The fresh snapshot of business activity, released by the Commerce Department Wednesday, underscored the resilience of the economy; it has managed to keep on moving despite the ill effects of the residential real-estate bust.

Click here to visit FOXBusiness.com's Economy Center.

The economy's performance in the October-to-December quarter, which followed two quarters of rather listless activity, exceeded analysts' forecasts for a 3 percent growth rate.

The economy opened 2006 on a strong note, growing at a 5.6 percent pace, the fastest spurt in 2 1/2 years. But it lost steam during the spring and late summer. It grew at a 2.6 percent pace in the second quarter and then a weaker 2 percent pace in the third quarter. The fourth-quarter's rebound ended the year on a positive note.

For all of 2006, the gross domestic product (GDP) increased by 3.4 percent, an improvement from a 3.2 percent showing in 2005.

That's even more impressive considering the economy was hit by the housing slump. Investment in home building for all of last year was slashed by 4.2 percent, the most in 15 years.

GDP measures the value of all goods and services produced within the United States and is the best barometer of the country's economic standing.

President Bush, who had a trip to New York scheduled Wednesday to discuss the economy, was certain to point to the GDP figures as evidence that his policies are working and benefiting most Americans. But Democrats, now in control of Congress for the first time in a dozen years, counter that economic inequality is widening and that it's harder for America's middle class to get ahead.

An AP-Ipsos poll in early January found that 55 percent of Americans disapproved of the president's handling of the economy, while 43 percent approved.

In the fourth quarter, consumers spent more freely, a major factor behind the rebound in overall economic activity. Consumer spending grew at a 4.4 percent annual rate, up from a 2.8 percent pace in the third quarter and the strongest since the opening quarter of 2006.

An improvement in the nation's trade picture helped by stronger U.S. export growth also was a factor in the overall GDP boost.

More brisk government spending also helped the fourth-quarter GDP. Government spending increased at a 3.7 percent pace in the final quarter, up from a 1.7 percent growth rate in the third quarter.

All those positive factors helped to blunt some negative forces.

Investment in home building during the fourth quarter plunged at a rate of 19.2 percent, even worse than the 18.7 percent drop in the prior quarter. Both were the worst drops in 15 years.

The drop in residential building in the fourth quarter shaved 1.16 percentage points off GDP. In the third quarter, it sliced a bigger 1.20 percentage point off of overall economic growth. That led to hope that the damage to the economy from the housing slump might be easing a bit.

Businesses, meanwhile, trimmed investment in equipment and software and reduced investment in inventory building.

Click here to visit FOXBusiness.com's Economy Center.