Canadian Prime Minister Justin Trudeau is hailing a new era in relations with China during his first official visit to his country's key trading partner.

Trudeau and Chinese Premier Li Keqiang agreed Wednesday to annual meetings and the eventual establishment of a mechanism to discuss national security and the rule of law.

Trudeau told a joint news conference that prior to his trip, China-Canada relations had "somewhat lacked in stability and regularity."

The two leaders also agreed to extend a Sept. 1 deadline that China had imposed on Canada to tighten its screening of canola exports. The move had threatened to bring major losses to Canadian farmers.

Li also said the case of a Canadian citizen detained in China on suspicion of spying was being handled according to law.