The trade deficit dropped sharply in April even though the politically sensitive imbalance with China increased to the highest level in three months. Strong overseas demand pushed American exports to an all-time high.

The Commerce Department reported Friday that the gap between what America sells abroad and what it imports totaled $58.5 billion in April, a 6.2 percent decline from the March deficit.

Exports edged up 0.2 percent to a record $129.5 billion, reflecting strong sales of soybeans and other farm products, commercial aircraft and industrial machinery. Imports fell 1.9 percent to $188 billion as foreign oil shipments dropped slightly even though the average price of crude oil increased.

The overall improvement in the deficit was larger than the small decline analysts had been expecting. It provided support for those who are forecasting that the deficit will narrow this year after setting records for five consecutive years.

Through the first four months of this year, the deficit is running at an annual rate of $705.9 billion, a drop of 6.9 percent from last year's record $758.5 billion imbalance.

The overall improvement is not reflected in the trade gap with China, which jumped 12.3 percent to $19.4 billion in April, the biggest deficit since January. So far this year, the trade gap with China is running 11.9 percent above last year's pace, when the deficit with China hit $232.6 billion. That was the largest trade gap ever recorded with a single country.

The deficit with China, which accounted for one-third of the overall deficit last year, has gotten increasing attention in Congress, where critics of the president's trade policies contend that China is manipulating its currency, stealing U.S. copyrights and pursuing other unfair trade practices.

Contending that the administration has not done enough to halt these practices, lawmakers have introduced a host of bills to impose penalty tariffs on Chinese products.

The administration, trying to head off a protectionist backlash, has launched a new series of high-level talks with the Chinese.

While the latest round of those discussions two weeks ago failed to yield any breakthroughs in the main area of contention, China's undervalued currency, Treasury Secretary Henry Paulson said this week that he remained committed to the discussions and believed they will reap more benefits than the United States could achieve without the talks.

For April, exports of American agricultural products set a record at $6.7 billion, reflecting strong increases in shipments of soybeans, nuts and meat. Exports of industrial materials and consumer goods also set records.

On the import side, the foreign oil bill edged down a slight 0.2 percent to $24.9 billion on a seasonally adjusted basis even though the average price of a barrel of crude oil rose to $57.28, the highest level since last September.

The deficit with Canada, America's largest trading partner, rose by 7.4 percent to $5.8 billion but the imbalance with Mexico, the other partner in the North American Free Trade Agreement, fell by 22.3 percent to $5.3 billion. The imbalance with the European Union was up 17.1 percent to $9 billion.