China says Canada needs to be aware of the consequences of aiding the United States in a case involving the Chinese tech giant Huawei that is believed to have sparked the detentions of two Canadians in China.

Foreign ministry spokesman Geng Shuang's comments Friday came after U.S. Vice-President Mike Pence and Canadian Prime Minister Justin Trudeau called for the release of Michael Kovrig and Michael Spavor.

Chinese authorities detained Spavor, a businessman, and former diplomat Kovrig on Dec. 10, shortly after Canada arrested China-based Huawei's Chief Financial Officer, Meng Wanzhou, on a U.S. warrant.

She faces extradition to the United States on charges she conspired to defraud global banks about Huawei's relationship with a company operating in Iran. She and the company have denied the charges and China has called for her release.

"We hope that the Canadian side can have a clear understanding of the consequences of endangering itself for the gains of the U.S. and take immediate actions to correct its mistakes so as to spare itself the suffering from growing damage," Geng said at a daily news briefing.

Asked about Pence's comments that U.S. President Donald Trump would speak with Chinese President Xi Jinping about the detained Canadians at a G20 meeting in Japan in June, Geng implied Canada was to blame for its problems in China.

Michael Spavor, left, and former Canadian diplomat Michael Kovrig, right, were formally charged with espionage this month. (The Associated Press/International Crisis Group/The Canadian Press)

Pence, who has taken a hard line on China, discussed the detained Canadians with Prime Minister Justin Trudeau in Ottawa on Thursday, where they also talked about Huawei and China trade issues.

Kovrig and Spavor were formally charged with espionage this month. China has also cut off imports of key Canadian commodities in an effort to press it.

Canada has called the arrests arbitrary.

During his visit, Pence thanked Canada for standing up for the rule of law in detaining Meng.

While Canada says China has made no specific link between the detentions of the two men and Meng's arrest, experts and former diplomats say they have no doubt it is using their cases to pressure Canada.