The US trade deficit fell back to a more normal level in April after a surge the previous month as the distortions from the West Coast port slowdown began to ebb.
The Commerce Department reported Wednesday that the April deficit fell to $40.9 billion from the huge $50.6 billion in March.
Exports gained $1.9 billion to $189.9 billion, while imports fell $7.8 billion to $230.8 billion.
The return to normal of processing goods through the key ports on the US Pacific coast appeared to be the main reason for the sharp swing, said Ian Shepherdson of Pantheon Macroeconomics.
"The March deficit was massively boosted by a surge in imports following the end of the port dispute on the west coast, while export rose only marginally. This story partly reversed in April," he said.
The export rebound could continue, he added. Data shows "that exports still need to rise much further in order to unwind the impact of the port dispute," he said.
The deficit the first four months of the year was up just 0.9 percent from the same period in 2014. But underpinning that was a 2.3 percent decline in exports, compared to a 1.8 percent rise in imports.
Overall the April data is a good sign for a rebound in US economic growth in the second quarter after the first quarter contraction, analysts said.
"The huge drag on GDP from trade in Q1 will almost certainly not be repeated in Q2. Trade could even be a modest plus, helped by a reversal of port delay effects," said Jim O'Sullivan of High Frequency Economics.