BEIJING — China’s ambassador to Canada has said that “Western egotism and white supremacy” were behind calls for Beijing to release two detained Canadians, further straining relations between the countries after the arrest in Canada last month of a Chinese technology executive.

The ambassador, Lu Shaye, wrote on Wednesday in an op-ed for The Hill Times, an Ottawa-based newspaper, that Canadians were applying “double standards” to the cases.

Some Canadians, he wrote, argued that their country was merely enforcing the law when it arrested Meng Wanzhou, the finance chief of the Chinese technology giant Huawei, but insisted that Beijing was out of line when it detained two Canadians soon after.

“It seems that, to those people, the laws of Canada or other Western countries are laws and must be observed,” Mr. Lu wrote, “while China’s laws are not and shouldn’t be respected.”