The value of goods imported into the U.S. in May continued to far outstrip the value of exports, widening the already massive trade deficit to a new record as the value of imported oil surged in May.

The

trade deficit

, a broad measure of the nation's international trade habits, widened by 1.8% in May to $31.04 billion, its highest level ever, compared to an upwardly revised $30.5 billion deficit in April, the

Commerce Department

said Wednesday.

Despite the wider deficit, the country actually experienced a decline in both imports and exports. The value of goods exported dropped 1% in May following a 0.2% decline in April, as foreign demand declined for U.S.-made automobiles, industrial goods and other big-ticket items.

Meanwhile, imports also dipped for the second straight month, down 0.3% in May vs. a 0.2% decline in April, suggesting that domestic demand for many types of foreign goods is weakening amid a general slowdown in

May retail sales. Consumers resumed their

spending habits in June, but retail sales remain below the heady levels seen late last year and earlier this year.

Although a widening of the trade gap is often seen as a thorn in the side of the strong U.S. economy, the May number could lend comfort to economists and policymakers, who might single out the decline in imports as a sign that U.S. consumers are curbing their spending habits in response to higher interest rates. The

Federal Reserve

has raised interest rates six times since last June. The rate increases were enacted in hopes to put domestic supply and demand closer into balance in an attempt to avoid a demand-driven bout of inflation.

May's wide deficit was highly influenced by the resurgence in demand for imported oil which came as oil prices in May backed off of the highs seen in March and April. The value of imported crude oil in May jumped 6.6% to $9.27 billion, vs. $8.69 billion in April, as the average price per barrel of crude oil dropped to $24.16 in May from $24.42 in April.

Despite the overall decline in imports, the wider overall deficit highlights the nation's continued reliance on foreign goods, which in turn has heightened the nation's dependence on inflows of foreign capital through investments. Many economists have argued that if the U.S. economy were to turn sharply downward, foreign investors might get nervous and pull some money out of U.S. investments. That move could lead to a weaker dollar and a heightened risk of inflation.

But for now, economists say that the continued attractiveness of U.S. investments is allowing the dollar to stay strong even as the trade deficit swells to new heights.

"The dollar is holding up reasonably well, because right now the world is remains confident in U.S. economy. The slightly slower activity in the economy doesn't seem to be any issue for foreign investors," said Daniel Laufenberg, chief economist at

American Express Financial Advisors

.