(Corrects ninth paragraph to show exports rising for a third consecutive month)
WASHINGTON, Sept 10 (Reuters) - The U.S. trade deficit widened the most in more than 10 years in July as imports grew a record 4.7 percent on resurgent U.S. demand for foreign cars, consumer goods and oil, a government report showed on Thursday.
The trade gap expanded 16.3 percent in July to $32.0 billion, the biggest month-to-month increase since February 1999.
Wall Street analyst had expected the trade deficit to be little changed from June, which the Commerce Department revised to $27.5 billion from its original estimate of $27.0 billion
U.S. imports grew for the second consecutive month to $159.6 billion, led by a $2.4 billion increase in imports of cars and car parts and a $1.7 billion increase in consumer goods such as medical drugs, toys, clothing and televisions.
Auto and auto parts imports were the highest since December and may have reflected dealers building up inventory in anticipation of Congress' "cash for clunkers" program to encourage motorists to exchange old gas guzzlers for new more fuel-efficient vehicles.
A sixth consecutive monthly rise in the average price of imported oil to $62.48 per barrel also helped widen the trade gap. Overall imports of petroleum products were the highest since December.
The trade deficit with China grew 10.8 percent in July, as imports from the Asian manufacturing giant hit their highest level since November.
The July trade gap remained far below the record of $64.9 billion set in July 2008, just before the global financial crisis took a huge bite out of international trade.
U.S. exports increased for the third consecutive month in July to $127.6 billion, a rise of 2.2 percent from June.
Goods exports had their best showing since December, led by increases for autos and auto parts and capital goods.
U.S. exports to Mexico were the highest since November 2008, although shipments to the European Union were the lowest since July 2006. (Reporting by Doug Palmer, Editing by Andrea Ricci)