The trade gap narrowed to $59.8 billion in May, from a slightly downwardly revised estimate of $60.5 billion for April. Wall Street analysts polled before the report had expected higher oil prices to widen the deficit to $62.5 billion in May.
U.S. exports, helped by the weak dollar, rose 0.9 percent in May to a record $157.5 billion, including individual records for exports to Canada, the European Union and South and Central America, the department said.
Record exports of industrial supplies and materials - including a record $5.7 billion worth of oil - led the rise, with a smaller increase for auto and auto parts. Consumer good exports rose slightly to a record.
U.S. imports rose 0.3 percent to a record $217.3 billion. Imports of non-petroleum goods also set records, as did imports of food, feeds and beverages, capital goods and consumer goods. Crude oil imports were a record $31.2 billion, as prices increased $9.47 per barrel in May - the biggest one-month jump ever. But responding to the higher prices, crude oil import volume fell to 294 million barrels in May, from 303 million in April.
In the first five months of 2008, the United States imported an average 9.77 million barrels of crude per day, compared to 10.10 million in the same period of 2007.
U.S. imports from Saudi Arabia and other members of the Organization of Petroleum Exporting Countries were a record $23 billion in May, pushing the U.S. trade deficit with those countries to a record $17.9 billion.
The closely watched trade deficit with China widened 4 percent in May to $21.0 billion. However, for the first five months of 2008, the gap totaled $96.0 billion, virtually unchanged from the same period last year.
Separately, the Labor Department said mport prices for petroleum products, including crude oil,rose 7.4 percent in June. They were up 78.6 percent for the year, which was the largest annual increase since February of 2003, the Labor Department said.
Economists polled ahead of the report were expecting overall import prices to rise 1.9 percent, and with oil hitting a new record above $146 per barrel on Friday, bigger gains in import prices will be expected.
The continued surge in fuel costs drove up airline fares from foreign airline carriers for the month by the biggest amount on record, a Labor official said.
Excluding petroleum, import prices rose 0.9 percent in June, the ninth straight increase. That reflected a continued rise in prices for food , feed and beverages, which rose 1.9 percent during the month and the largest yearly rise on record.