Canada's trade deficit fell in April and its surplus with the United States ballooned to its largest in three years, boosted by shipments of cars, natural gas and softwood lumber, Statistics Canada said Friday.

The country's trade surplus with the U.S. hit $5.0 billion for the month, up from $3.4 billion in March, at a time when the Canadian dollar slipped 0.3 cents US compared to the greenback, the federal agency said.

The data could provide ammunition for U.S. President Donald Trump, who has pointed to what he says is America's trade imbalance with Canada as a rationale for sweeping changes to U.S. trade policies, including revamping NAFTA.

Canadian exports south of the border rose 5.4 per cent to a record high $36.1 billion in April. Imports from Canada's largest trading partner were up 1.1 per cent to $31.1 billion.

CIBC economist Nick Exarhos pointed out that while overall shipments of forestry products were up a healthy 4.7 per cent, that was before the U.S. Commerce Department imposed duties on Canadian softwood products ranging from three to 24 per cent.

"That leaves the sector exposed," Exarhos said in a note to clients.

Canada's trade deficit with all countries narrowed to $370 million, down from a revised shortfall of $936 million for March. Economists had expected a razor-thin deficit of $70 million, according to Thomson Reuters.

"All told, a solid first indicator on April GDP, despite what was a miss on the headline," Exarhos said.

Exports rose to a record high $47.7 billion, a gain of 1.8 per cent. Shipments of motor vehicles and parts were up 4.4 per cent to $8.1 billion, while exports of energy products increased to $8.8 billion, up 2.5 per cent.

Imports hit $48.1 billion, a fifth consecutive monthly increase and also a record high.

Brian DePratto, a senior economist with TD Economics, said while the overall figures provide for a positive read of the economy, trade data can be volatile.

"We remain of the view despite improving growth prospects, the Bank of Canada will maintain a cautious approach, waiting until April of 2018 to begin a monetary tightening cycle, although the balance of risks are beginning to shift towards an earlier start, rather than a later one," he said in a research note.