Container ships are positioned under cranes at the Port of Oakland, California.

March's decline ended six straight monthly increases in the trade deficit. Economists polled by Reuters had forecast the trade gap narrowing to $50 billion in March.

The Commerce Department said on Thursday the trade gap dropped 15.2 percent to $49 billion, the lowest level since September. Data for February was revised slightly to show the trade gap widening to $57.7 billion, which was the highest level since October 2008, instead of the previously reported $57.6 billion.

The U.S. trade deficit narrowed sharply in March as exports increased to a record high amid a surge in deliveries of commercial aircraft and soybeans.

The politically sensitive goods trade deficit with China dropped 11.6 percent to $25.9 billion, which will probably do little to ease tensions between the United States and China.

U.S. President Donald Trump has threatened tariffs on up to $150 billion worth of Chinese goods to punish Beijing over its joint-venture requirements and other policies Washington says force American companies to surrender their intellectual property to state-backed Chinese competitors.

China, which denies it coerces such technology transfers, has threatened retaliation in equal measure, including tariffs on U.S. soybeans and aircraft.

Trump, who claims the United States is being taken advantage of by its trading partners, has already imposed broad tariffs on imported solar panels and large washing machines. He recently slapped 25 percent import duties on steel and 10 percent on aluminum.

The deficit with Mexico vaulted 32.8 percent to a record $8.1 billion in March. The U.S. had a $0.3 billion surplus with Canada in March.

When adjusted for inflation, the trade deficit dropped to $62.1 billion from $69.0 billion in February. The government reported last week that trade contributed 0.20 percentage point to the first quarter's 2.3 percent annualized growth pace.

In March, exports of goods and services increased 2.0 percent to an all-time high of $208.5 billion, lifted by a $1.9 billion increase in shipments of commercial aircraft. There were also increases in exports of soybeans, corn and crude oil. Real goods exports were the highest on record.

Exports to China jumped 26.3 percent in March.

Imports of goods and services fell 1.8 percent to $257.5 billion, in part as the boost from royalties and broadcast license fees related to the Winter Olympics faded. Imports of capital goods fell by $1.5 billion, weighed down by declines in imports of computer accessories, telecommunications equipment, and semiconductors.

Imports of consumer goods decreased by $0.9 billion. Crude oil imports dropped by $0.5 billion in March. Imports from China fell 2.1 percent in March.