A jump in oil prices helped widen the U.S. trade deficit in June, but a sharp fall in manufactured goods exports and imports appears to have stabilized, a Commerce Department report showed on Wednesday.

The monthly trade gap totaled $27.0 billion, up 4.0 percent from May. The shortfall was smaller than many analysts expected because stronger foreign demand for U.S. goods and services offset some of the impact of higher oil prices.

Both U.S. exports and imports remained sharply below records reached in July 2008, just before the global financial crisis began wreaking a savage toll on international trade.

But the sharp decline in U.S. exports and imports of manufactured goods appears to be stabilizing, said Frank Vargo, vice president for international economic affairs at the National Association of Manufacturers.

For the fourth month in a row, U.S. manufactured goods exports totaled roughly $67 billion and manufactured goods imports were roughly $93 billion, Vargo said.

The trade gap for the first six months of 2009 totaled nearly $173 billion, down more than 50 percent from the same period last year. Year-to-date exports were down 19.3 percent from 2008, while imports were off 28.8 percent.

The smaller-than-expected June deficit was, by itself, good news for the U.S. economy, which is beginning to show signs of emerging from a recession that began in December 2007.

However, other data already released on construction and inventories point to a downward revision of second quarter GDP growth to -1.6 percent from -1.0 percent, said Nigel Gault, chief U.S. economist at IHS Global Insight.

Looking ahead, the monthly gap between imports and exports should widen in the second half of the year as producers and retailers restock currently lean inventories.

So, unlike the first half of 2009, trade will become a drag on growth. But that would be a drag in a context where both exports and imports are growing, as the U.S. and global economies climb out of recession, Gault said.

OIL PRICE UP

U.S. imports of goods and services rose 2.3 percent in June to $152.8 billion, the highest since January. Higher oil prices accounted for much of the increase, and imports of consumer products fell to the lowest since November 2005.

The average price for imported oil rose for the fourth straight month to $59.17 per barrel, helping to widen the U.S. trade gap with the Organization of Petroleum Exporting Countries to the highest since October 2008.

U.S. exports rose 2.0 percent in June to $125.8 billion, led by stronger foreign demand for industrial supplies and materials and capital goods.

Exports of foods, feeds and beverages were the highest since October 2008.

But building on those gains may be difficult.

While we are seeing signs that the worst part of the recent economic downturn is behind us, we still face challenges to resuscitate domestic manufacturing and expand U.S. exports, U.S. Commerce Secretary Gary Locke said in a statement.

The politically sensitive U.S. trade gap with China widened to $18.43 billion, the largest with any single country. Imports from China were $23.98 billion in June, while U.S. exports to that country totaled $5.55 billion.

Other data on Wednesday showed U.S. mortgage applications fell last week, reflecting a drop in demand for home refinancing loans as interest rates soared to their highest levels since June.

The Mortgage Bankers Association said its seasonally adjusted index of mortgage applications, which includes both purchase and refinance loans, for the week ended August 7 decreased 3.5 percent.

The report showed that while refinancings were down sharply, applications for loans to buy homes, which are less sensitive to interest rates than refinancings and are an early indicator of sales, rose slightly.

Still, the tepid interest in purchase loans does not bode well for the hard-hit U.S. housing market, which has been showing signs of stabilization.

(Additional reporting by Julie Haviv, Ryan Vlastelica and John Parry in New York)