A shipping container is moved at the Port of Oakland.

The U.S. trade deficit improved slightly in March amid broad declines in both imports and exports, government data showed on Thursday.

The Commerce Department said the trade gap dipped 0.1 percent to $43.7 billion. February's trade deficit was revised up to $43.8 billion from $43.6 billion.

Economists polled by Reuters had forecast the trade gap rising to $44.5 billion in March.

When adjusted for inflation, the trade deficit rose to $60.00 billion from $59.94 billion in February.

The government reported last week that trade had a neutral impact on the 0.7 percent annualized rise in gross domestic product in the first quarter.

The Trump administration is looking at trade as it seeks to boost annual economic growth to 4 percent.

President Donald Trump told Reuters that he was "psyched" to terminate the North American Free Trade Agreement with Canada and Mexico, but changed his mind after their leaders asked for it to be renegotiated instead.

NAFTA which was signed in 1994 by the United States, Canada and Mexico removed most trade and tariff barriers between the neighbors, but Trump and other critics have blamed it for deep U.S. job cuts.

In March, exports of goods and services fell 0.9 percent to $191.0 billion. Exports to China fell 1.8 percent and those to Mexico and Canada surged 15.8 percent and 17.9 percent, respectively.

Imports of goods and services slipped 0.7 percent to $234.7 billion. Imports had risen in recent months on higher oil prices. Imports of goods from China increased 4.4 percent to $34.2 billion in March, boosted by cellphones.

The politically sensitive U.S.-China trade deficit increased 7.0 percent to $24.6 billion in March.