The U.S. trade deficit narrowed in March as exports rebounded, but the improvement was probably not enough to help first-quarter growth.

The Commerce Department said on Tuesday the trade gap fell 3.6 percent to $40.4 billion. February's deficit was revised to $41.9 billion from a previously reported $42.3 billion.

Economists polled by Reuters had forecast the trade deficit falling to $40.3 billion in March. When adjusted for inflation, the trade deficit dipped to $49.4 billion from $49.8 billion in February.

March's shortfall, however, was a little bigger than what the government had assumed in its advance first-quarter gross domestic product estimate last week, suggesting the economy contracted in the first three months of the year.

Trade subtracted 0.83 percentage point from GDP growth in the first quarter, helping to hold down the economy to a 0.1 percent annual growth rate.

The trade report was the latest indication that the government will likely lower its growth estimate to show a contraction when it publishes revisions later this month.

Data last week showed spending on construction projects and factory inventories in March were not as strong as the government had assumed. Those reports had suggested the economy contracted at about a 0.4 percent rate in the first quarter, according to economists.

The three-month moving average of the trade deficit, which irons out month-to-month volatility, increased to $40.5 billion in the three months through March from $40.0 billion in the prior three-month period.

Exports increased 2.1 percent to $193.9 billion in March, the highest level since November. The rise in exports fit in with other data suggesting momentum in the economy at the end of the first quarter.

Exports in the first quarter posted their largest quarterly decline in five years, according to data released last week.

Exports of capital goods, industrial supplies and materials, and automobiles increased in March. Exports of services hit a record high, while those of non-petroleum goods were also the highest on record. Exports to Canada, South Korea and Germany touched record highs in March.

"It's good to see a rebound in exports as well as imports. We want to see more trade flow through to show global economic activity is on the road to recovery from the stumble earlier this year," said Sam Bullard, senior economist at Wells Fargo Securities in Charlotte, North Carolina.

Imports rose 1.1 percent to $234.3 billion in March, the highest level in two years, in part reflecting a rise in the price of petroleum. A slow pace of restocking by businesses as they worked through an inventory glut accumulated in the second half of 2013 has restrained imports in recent months.

In March, food imports hit a record high and non-petroleum imports were the highest on record.

Goods and services sold to China increased 9.6 percent, while imports from that country advanced 1.6 percent.

That left the politically sensitive U.S. trade deficit with the world's second-largest economy at $20.4 billion in March, compared to $20.9 billion in February.