
The deficit stood at C$3.4 billion (US$2.5 billion), after two months of surpluses, the statistics institute reported on Thursday. In April, the country recorded a trade surplus of C$894 million.
Exports fell by 3.8%, two-thirds of which was attributable to energy and farm and food products. Exports of agricultural and fishing products (-13.4%) fell the most in May.
According to Statistics Canada, demand for Canadian grains has slowed in recent months due to an improvement in global supply, particularly for wheat and canola.
The energy sector, one of the main drivers of the Canadian economy, saw its exports fall by 7.3% in May due to lower prices.
On the import side, most sectors saw an increase, for a total rise of 3.0%, or almost C$2 billion.
Imports of unwrought gold, silver and platinum group metals and their alloys (+42.8%) rose sharply, due to large shipments of silver from the UK.
Statistics Canada attributes this rise to economic uncertainty, which tends to increase demand for precious metals. Imports of motor vehicles and parts also rose by 4.5%.
The trade surplus with the US, the country with which Canada does the vast majority of its trade, narrowed to C$6.7 billion.