The US trade deficit unexpectedly fell in June as exports advanced to an all-time high, offsetting another big surge in oil imports. The Commerce Department reported Tuesday the trade imbalance dropped to $56.8 billion in June, down by 4.1 percent from a revised May deficit of $59.2 billion. It was the smallest deficit in three months and much better than the $61.5 billion deficit Wall Street had been expecting. Exports of goods and services rose to a record of $164.4 billion, helped by the dollar's declines earlier in the year, which have made US goods cheaper on overseas markets. Imports also rose to a record of $164.4 billion, up 1.8 percent from the May level. But the increase was driven by a 14.6 percent surge in petroleum imports, which hit an all-time high of $44.5 billion as crude oil prices jumped to record levels. The country's goods trade deficit outside of petroleum shrank to the lowest level since February 2003. Demand for a variety of consumer products from clothing to televisions and furniture has weakened, reflecting the sharp economic slowdown in the United States. Through the first half of this year, the trade deficit is running at an annual rate of $702.8 billion, up only slightly from last year's deficit of $700.3 billion. The 2007 deficit was down 7 percent from 2006, marking the first annual improvement after five straight years of record deficits. President George W. Bush's administration points to the falling deficits as evidence that the president's trade policies are working to open overseas markets to US products. But critics say the deficits still remain far above the levels when Bush took office. They also contend that the string of record deficits contributed to the loss of more than 3 million manufacturing jobs since 2001 as many companies moved production to low-wage countries. The deficit in June, after adjusting for inflation, was the lowest monthly imbalance since December 2001, a month when the country was struggling to emerge from the last recession. Many economists believe the 2008 slowdown will ultimately be ruled a recession too, although the gross domestic product has yet to post back-to-back negative quarters, a traditional definition of a downturn. The GDP expanded at an annual rate of 1.9 percent in the April-June quarter. It may have been negative during that period, however, had it not been for a sizable improvement in the trade balance, reflecting the drop in demand for imports and surging export sales. Economists are worried that the big lift from exports could fade in coming months if economic growth in Europe and Japan, two big overseas markets for American goods, falters. The politically sensitive deficit with China rose to $21.4 billion in June, the largest monthly imbalance since a record $25.9 billion deficit with China last October. The deficit is likely to rise further in coming months. The Chinese reported Monday that their surplus with the world rose to the highest level in eight months in July. Its surpluses with the United States and the 27-nation European Union expanded. Critics accuse China of unfair trade practices such as artificially depressing the value of its currency to boost the competitiveness of Chinese products. The Bush administration, led by Treasury Secretary Henry Paulson, has been prodding China to move more quickly to allow its currency to rise against the dollar.