Canada’s merchandise trade balance recorded its first monthly deficit since July, due to a combination of higher imports of pharmaceutical products and the appreciation of the Canadian dollar.

The country posted a C$312 million trade deficit in December, from a surplus of C$1.1 billion a month earlier, Statistics Canada reported Wednesday in Ottawa. Economists had been expecting exports to exceed imports by C$1 billion in December.

The drop in exports that month was partly due to the increase in the average value of the Canadian dollar by 1.5 US cents compared with November. When the loonie appreciates against the greenback, monthly trade values expressed in Canadian dollars are lower.

A large proportion of import and export transactions are done in US dollars and must be converted to Canadian dollars to compile monthly statistics, the agency said. Total exports were down 1.9% in December and imports increased 0.2%. But when expressed in US dollars, Canadian exports edged up 0.1%, and imports rose 2.3%.

Imports of consumer goods jumped 9.4%, the strongest monthly increase on record for this product category. Imports of pharmaceutical products, which surged 28.1%, contributed most to the increase, driven by “atypical high-value imports” from the US, the agency said. Clothing and alcoholic beverages also posted notable increases.

In volume terms, exports fell 0.4%, while imports rose 1.3%.