Surging exports led by higher-priced energy products allowed Canada to shrug off new U.S. steel and aluminum tariffs in June to post the lowest monthly merchandise trade deficit with the world since January 2017.

The difference between Canada’s exports and imports narrowed to negative $626 million in June from negative $2.7 billion in May, the smallest deficit since January 2017, fuelled by an increase in the value of total exports of 4.1% while imports edged down by 0.2%, Statistics Canada (StatsCan) reported Friday.

Analysts had expected a trade deficit of $2.3 billion, according to a poll by Thomson Reuters Eikon. In volume terms, exports rose by 2.1% and imports were down by 1.3%.

“We thought steel and aluminum tariffs would be the story of this morning’s trade report, but strong export growth in most other sectors swamped the impact of those new duties,” said Josh Nye, senior economist with Royal Bank of Canada’s economics research department.

Benjamin Reitzes, Canadian rates and macro strategist with BMO Capital Markets, pointed out in a note that Canada’s metal product exports fell by 1.1% in June vs May, “hardly a huge move,” adding that steel exports were off by 14.3% compared with June 2017, and aluminum shipments rose by 10.2%.

“Consistent with supply dynamics, the impact looks to be larger on steel than aluminum, but in the broader scheme of things, the impact thus far appears to be minimal,” he said.

StatsCan noted that, on an unadjusted basis, exports of steel products to the U.S. that were subject to a 25% tariff fell by 36.8% in June after unusual gains of 40% from February to May.

Exports of aluminum to the U.S. that were subject to a 10% tariff were down by 7% in June, following gains of 28.5% from February to May.

The trade surprise, when added to robust gross domestic product growth in May and June’s six-year-high inflation number, adds to the likelihood that the Bank of Canada will increase interest rates this fall, economists agreed.

“Heading into today’s number, June was expected to be a soft month for the Canadian economy, coming off a roaring gain in May and feeling the drag of oil production shutdowns in June,” said Canadian Imperial Bank of Commerce economist Royce Mendes in a report. “But the first indications for the month suggest that there could be some growth left to come in the second quarter, upgrading the odds of a likely Bank of Canada rate hike in the coming months.”

Canada’s largest trading partner, the U.S., was the destination for a record $37.1 billion of exports in June, up by 2.5% — mainly because of passenger cars and light trucks, StatsCan reported.

Meanwhile, imports from the U.S. were up by 0.3% to $32.9 billion, resulting in Canada’s trade merchandise trade surplus with the U.S. rising to $4.1 billion.

Overall exports rose to $50.7 billion in June, the first time they have surpassed the $50-billion mark, as the value of exported energy products jumped by 7.1% to $9.9 billion, the highest since October 2014.

Crude oil exports were mainly responsible for the gain, up by 6.6% to $7.2 billion on the strength of prices, but refined petroleum products also rose, by 19.2%, on sales of heavy fuel oils and diesel fuel.

Excluding energy products, Canadian exports were up by 3.4%, as exports of aircraft and other transportation equipment and parts surged by 19% to a record $2.5 billion. Aircraft exports alone were up by 44.5% to $984 million.

Total exports rose by 9.2% in June compared with the same month last year.

Canada imported products worth $51.3 billion in June, despite increases in seven of 11 product sections. Total imports were up by 4.2% compared with June 2017.

Imports of energy products decreased by 15.1% to $2.9 billion in June compared with May, as Canadian refineries came back on stream following spring maintenance shutdowns.

After posting a record high in May, imports of aircraft and other transportation equipment and parts fell by 17.1% to $2 billion, returning to April levels, StatsCan reported.