U.S. economic data painted a picture of a firming recovery on Friday as consumer confidence rose to its highest level in six months and the country's trade deficit narrowed much more than expected.

Consumer sentiment in December rose to its highest level since June and was at its third-highest since the start of 2008, according to the Thomson Reuters/University of Michigan survey. Government data showed U.S. exports in October rose a robust 3.2 percent while imports declined, which may bode well for fourth quarter economic growth.

The consumer sentiment report was another sign consumers could be ready to spend this holiday season.

This is an indication of the favorable development we are seeing so far with the year-end holiday shopping season, said Pierre Ellis, senior global economist at Decision Economics in New York. It adds to a growing number of economic indicators that are looking better-than-expected.

The survey's preliminary December reading for consumer sentiment came in at 74.2, up from 71.6 in November. That was above the median forecast of 72.5 among economists polled by Reuters.

Chiming with recent signs of improvement in the labor market, consumers cited more favorable news about changes in the employment situation. Slow jobs growth is seen as one of the biggest impediments to economic recovery.

At the same time, the survey's barometer of current economic conditions rose to its highest reading since January 2008, just after the economic downturn began. The index for December came in at 85.7, up from 82.1 in November and also , above a forecast of 83.1.

Although the unemployment rate edged up to 9.8 percent in November, weekly data have shown new U.S. claims for unemployment benefits fell more than expected last week and the four-week moving average slipped to a two-year low.

The sentiment survey was taken before a tentative deal on extended tax cuts reached earlier this week. However, compilers point to a widespread expectation the cuts would be extended and say confidence could fall again if the cuts are blocked.

Meanwhile, the U.S. trade deficit for October totaled $38.7 billion, down from a revised estimate of $44.6 billion for September. Analysts surveyed before the report had expected the deficit to narrow just slightly to about $43.60 billion.

The smaller-than-expected deficit could boost estimates for U.S. fourth-quarter economic growth because it implies a larger share of U.S. demand is being met by domestic production.

Imports declined slightly in the face of slackening demand for industrial and petroleum products, the report from the Commerce Department showed.

This suggests that the economy is accelerating, said Neil Dutta, an economist at Bank of America Merrill Lynch in New York, raising his forecast of fourth-quarter economic growth to about 3.0 percent.

But one big reason the trade deficit is shrinking is because we're still in a slower-growth economy. You'd imagine that a smaller number would be a good thing, but it's because people still have to contend with a slower economy said Robert Pavlik, chief market strategist at Banyan Partners in New York.

U.S. stock indexes were marginally higher after the reports, hovering close to new recent highs. U.S. Treasury bond prices added to losses while the dollar gained.

On an annual basis, the trade deficit has widened sharply this year and could surpass $500 billion when final figures for 2010 are available. Last year, in the midst of the global financial crisis which put a squeeze on world trade, the U.S. trade gap narrowed about 46 percent to $374.9 billion.

Record exports to China and Mexico in October helped push the overall export tally to $158.7 billion, the highest since August 2008. Exports to the European Union and Japan also showed growth.

Despite record exports to China in October, the U.S. trade deficit with that country in the first 10 months of 2010 was $226.8 billion, up 20.3 percent from the year-earlier period.

The sharp rise is likely to keep China's trade and currency policies on the minds of U.S. lawmakers in 2011.

(Editing by Chizu Nomiyama)