Updated

WASHINGTON -- The U.S. trade deficit surged in June to the highest level since October 2008 and imports of foreign consumer goods hit an all-time high. But U.S. exports faltered, representing a setback for American manufacturers.

The deficit jumped 18.8 percent in June compared to May, widening to $49.9 billion, the Commerce Department reported Wednesday. The wider deficit came as a surprise to economists who had forecast a smaller trade gap because of lower global oil prices.

U.S. exports slipped 1.3 percent to $150.5 billion. Sales of American farm products, computers and telecommunications equipment all declined. Imports rose 3 percent to $200.3 billion. Imports of consumer goods surged to a record high as shipments of cell phones, household appliances, televisions and clothing all increased.

The deficit in goods and services, the difference between what America sells abroad and what the country imports, rose to the highest level since October 2008 when it stood at $59.4 billion.

Through the first six months of this year, the deficit is running at an annual rate of $494.9 billion. That is up 32 percent from the $374.9 billion deficit for all of 2009 -- a year when the deficit was cut nearly in half as a result of the recession.

Economists had expected the deficit to widen this year as an improving domestic economy lifted U.S. demand for foreign consumer goods and industrial products.

American manufacturers have enjoyed growing demand for their products in Asia. But they have faced weakness in Europe, where the economic rebound has been subdued by a debt crisis that erupted in the spring. Exports of electric generators, civilian aircraft and machine tools did buck the downward trend in June to post increases.

The wider deficit in June will likely further depress overall U.S. growth as measured by the gross domestic product in the April-to-June quarter. The Commerce Department initially estimated growth at 2.4 percent for the second quarter. That figure will likely be revised lower now because of the wider trade deficit.

The prospects for U.S. exports have been hurt by a rise in value for the dollar against some foreign currencies. That includes the euro. And it is also affected by China's refusal to heed the Obama administration's demands that it allow its currency to rise in value against the dollar. A weaker dollar against the yuan would boost the competitiveness of U.S. products in China while making Chinese goods more expensive in the United States.

For June, the U.S. trade deficit with China rose 17.4 percent to $26.2 billion. Through the first six months of this year it is running 15.9 percent higher than the same period a year ago. That is certain to increase pressure on Congress to pass legislation that would impose stiff economic sanctions on China unless it moves more quickly to allow its currency to rise in value.