The U.S. trade deficit narrowed in February, likely giving a major boost to first-quarter gross domestic product.

The trade deficit goods and services contracted 3.4% to a seasonally adjusted $49.38 billion, the Commerce Department said Wednesday. Economists had expected the trade deficit to expand to $53.6 billion from January’s $51.1 billion.

The trade gap narrowed because exports increased faster than imports in February. Exports rose 1.1 percent while imports increased 0.2 percent.

Exports of civilian aircraft, an often volatile category, rose $2.2 billion in the month. Auto exports rose $0.6 billion. Consumer goods exports rose as well.

Exports of services, always a strength in these trade reports, rose 0.3 percent to $70.1 billion.

The trade gap in goods with China shrank 9.3% from the prior month to a seasonally adjusted $30.12 billion, as the U.S. exports rose and imports declined compared with the prior month. This is likely evidence that the threat of tariffs rising caused a rush of imports in December and January.

Soybean exports jumped 15.6% in February. That likely reflects China returning to the U.S. market.

Year to date, the trade gap with China is $59.2 billion, down significantly from the $65.2 billion deficit in the first two months of last year.

The deficit with both the European Union and Canada narrowed in February. The deficit with Japan and Mexico expanded.