Canada's trade deficit narrowed to Can $955 million (US $718 million) in August, according to government data released Friday, with exports picking up after two months of decline.
The figure was slightly better than what economists had expected, following an upwardly revised $1.4 billion shortfall the previous month.
Canada's surplus with its biggest trading partner, the United States, meanwhile, widened from $4.4 billion in July to $4.9 billion in August.
"Canada's trade balance looked better than at last check, but not by much," CIBC economist Royce Mendes commented in a research note.
"There's little reason to believe that the deficit will swing back into surplus anytime soon."
Exports rose 1.8 percent to $50.6 billion on the back of stronger shipments of energy products and aircraft, while imports climbed 1.0 percent to $51.5 billion, mostly on higher gold and crude oil imports, Statistics Canada said.
Exports of nuclear fuel and refined petroleum products increased in the month, and more business jets were sold to buyers in the United States.
Metal and non-metallic mineral exports also rose as a result of purchases of higher-priced gold.
Those gains were partially offset by fewer exports of vehicles and auto parts as a result of prolonged assembly plant shutdowns.
Imports of gold, meanwhile, reached their highest level in more than two years as Canadian companies stocked up.
There were also increased imports of crude oil from the United States, Nigeria and Ivory Coast, amid production disruptions at North Atlantic oil platforms that supply refineries in eastern Canada.
Imports of consumer goods, however, decreased. Pharmaceutical imports, which hit a record high in July, were down 15.8 percent in August, nearly reversing the gain from the previous month.