Statistics Canada says the country posted a merchandise trade deficit of $987 million in July as imports fell on lower shipments of gold and the B.C. port strike.
The agency says the result compared with a revised deficit of $4.9 billion in June.
Total imports fell 5.4 percent in July as imports of metal and non-metallic mineral products dropped 25.3 percent.
Statistics Canada says imports of the subcategory including unwrought gold, silver, and platinum group metals, and their alloys fell 60.5 percent in large part because of lower gold asset transfers between financial institutions.
The agency also said imports of goods that typically come from Pacific Rim countries and rely on B.C. ports were lower. Imports of consumer goods fell 4.9 percent, while electronic and electrical equipment and parts dropped 6.4 percent. Imports of industrial machinery, equipment, and parts declined 6.1 percent.
Meanwhile, total exports rose 0.7 percent as lower exports of some goods due to the port strike were more than offset by increases in products less affected by the job action.