The U.S. trade deficit was the smallest in four years in November as exports hit a record high and weak oil prices restrained import growth, the latest evidence of strengthening economic fundamentals.

The Commerce Department said on Tuesday the trade gap fell 12.9 percent to $34.3 billion. That was the smallest deficit since October 2009.

October's shortfall on the trade balance was revised to $39.3 billion from the previously reported $40.6 billion.

Economists polled by Reuters had forecast the trade deficit slipping to $40.0 billion in November.

When adjusted for inflation, the trade gap fell to $44.6 billion from $47.0 billion the prior month.

This measure goes into the calculation of gross domestic product, and November's decline could see economists bump up their fourth-quarter growth estimates.

Trade contributed marginally to growth in the third quarter, but abating fiscal headwinds in Europe should see a recovery in demand in that region and help to boost U.S. exports.

The U.S. economy appears positioned to shift into higher growth this year, with data ranging from employment to manufacturing and consumer spending suggesting it ended 2013 on a solid footing. The outlook has been strengthened by a pick-up in domestic demand and diminishing uncertainty over fiscal policy.

In November, exports rose 0.9 percent to $194.9 billion. That was the highest on record and marked a second straight month of gains. There were increases in exports of industrial supplies, capital goods and automobiles.

Petroleum exports hit a record high in November.

Exports to China also were the highest on record. There were also increases in exports to Germany and Japan.

Overall imports fell 1.4 percent to $229.1 billion in November. Part of the decline in imports reflects a lower petroleum import bill, which was the smallest since November 2010. Imports of industrial supplies and materials were also the lowest since November 2010.

But strengthening consumer spending should draw in more imports, widening the deficit.