WASHINGTON -- The U.S. trade deficit fell sharply in December as exports grew at a solid pace while imports of oil and many other goods shrank from the prior month, the Commerce Department reported Friday.The big drop in the deficit, to $38.5 billion in December from $48.6 billion in November, indicates that the trade picture was not as bleak at year's end as previously thought. And that should push up the fourth-quarter change in gross domestic product into positive territory from the 0.1 percent decline in the government's initial estimate.For all of 2012, America's trade deficit of goods and services dipped 3.5 percent to $540.4 billion -- reversing two straight years of double-digit percentage gains in the deficit.U.S. exports rose 4.5 percent last year from 2011, with strong increases particularly of cars and auto parts, and capital goods such as airplanes, electronics and engines. Imports grew 3 percent last year, mostly behind shipments of a wide range of capital goods.What made the big difference last year, though, was that the U.S. imported a lot less commodities: The dollar value of imports of crude oil, natural and liquefied petroleum gases fell by a combined $27 billion from 2011, partly reflecting America's increased production of energy.Analysts were surprised by the big fall in December's trade deficit; on average, they were expecting the deficit to narrow just a little from November's number, to about $46 billion. Some of the slide in December imports could suggest weakening American consumer demand, said Chris Williamson, chief economist at Markit, a financial information services company.Still, Williamson noted that with China's exports surging in the past two months and some leading European countries showing signs of a pick-up in trade, the data are "starting to confirm the message from the worldwide business surveys that global economic growth is reviving at the start of 2013, assisted by rising trade flows, with the U.S. acting as an important driver of the revival."The U.S. trade deficit of goods and services hit a peak of $753.3 billion in 2006, and it fell to $379.2 billion in 2009 when the economy was still in recession, before starting to rise again, Commerce Department figures show.Last year's narrowing of the trade deficit, to $540.4 billion, was thanks to sharply lower imports of oil. The American deficit in goods trading with OPEC countries fell to $98.9 billion last year from $126.9 billion in 2011. Meanwhile, the U.S. shortfall in trade with China edged higher, to $315 billion from $295.4 billion in 2011, while the deficit with Europe also ticked up, to $125.9 billion in 2012 from $119.7 billion the previous year.