Canada’s merchandise trade deficit narrowed more than forecast as oil producers and aircraft makers led exports to a record high.

Even after the U.S. imposed tariffs on steel and aluminum, Canada’s trade gap narrowed to $626 million in June, down from $2.7 billion a month earlier, Statistics Canada said Friday in Ottawa. Economists surveyed by Bloomberg predicted a deficit of $2.3 billion.

Exports rose 4.1 per cent to  $50.7 billion, with energy shipments up 7.1 per cent to the highest since 2014 and aircraft sales jumping by almost 45 per cent. The return of several Canadian refineries to production after shutdowns also played a role in the 0.2 per cent decline in imports as demand for foreign gasoline tumbled.

“Canadian trade was a large and pleasant surprise in June, and a surge in exports for the month capped a solid quarter,” Canadian Imperial Bank of Commerce chief economist Avery Shenfeld wrote in a research note. Economic growth is on track for a 3 per cent annualized pace in the second quarter, and the trade data bolsters the case for another central bank rate increase by October, he said.

Canada’s dollar strengthened 0.3 per cent to $1.2987 per U.S. dollar at 8:52 a.m. Toronto time. Yields on 2-year government bonds rose to 2.1 per cent, touching the highest in almost a decade. The report raised expectations for a Bank of Canada rate increase in September to 39 per cent, from 32 per cent yesterday and 12 per cent a fortnight ago.

The improving trade balance more than offset declines in exports to the U.S. of steel and aluminum, which fell 37 per cent and 7 per cent after President Donald Trump’s tariffs took effect. Prime Minister Justin Trudeau’s government retaliated dollar-for-dollar the following month.

Canada’s exports are on pace to outpace imports over the next year according to Bloomberg forecasts, reflecting higher crude oil prices and demand for building materials in a growing global economy. The Bank of Canada is counting on trade and investment to contribute more to an economic expansion as it raises interest rates, while saying protectionism remains the biggest risk.

Other Details

The trade deficit was the smallest since January 2017 Canada’s bilateral trade surplus with the U.S. grew to $4.1 billion in June from $3.3 billion in May, making it the biggest in more than a year Metals shipments created the biggest drag on Canada’s exports in June Exports rose 6 percent between April and June, the fastest quarterly increase in a decade. The quarterly trade deficit narrowed to $4.9 billion from $8.6 billion. The volume of exports, considered a more reliable reading of economic growth because it strips out price changes, climbed 2.1 per cent. Import volumes fell 1.3 per cent The year-to-date trade deficit of $13.5 billion is the second-largest on record