The U.S. trade deficit swelled to $29.75 billion in the July-September quarter, the highest imbalance in a year, as the Persian Gulf crisis drove up the cost of foreign oil against a drop in demand for American farm products, the government said Tuesday.

The Commerce Department said that the trade gap in the third quarter was a sharp 28.9 percent higher than the $23.10 billion imbalance in the April-June period. The second quarter deficit had been the lowest in more than six years.The turnaround occurred because imports shot up 5 percent to an all-time high of $125.91 billion while U.S. exports edged down 0.6 percent to $96.16 billion, reflecting the drop in demand for American farm products. The deficit is the difference between imports and exports.

The July-September imbalance was the largest quarterly deficit since a $29.80 billion deficit in the same period last year. Since that time, the deficit had been on a steadily declining path as a boom in U.S. export sales helped to narrow America's huge trade deficit and give the economy one of its few bright spots.

However, since Iraq's Aug. 2 invasion of Kuwait, economists had been forecasting that a higher foreign oil bill would translate into a rising trade deficit, adding one more negative factor to an economy already flirting with a recession.