Former Canadian diplomat Michael Kovrig, being held in China on suspicion of endangering national security, is not entitled to diplomatic immunity, China's foreign ministry said on Monday.

Canadian Prime Minister Justin Trudeau on Friday chastised China over the detention of two Canadians following the arrest of a senior Chinese executive at the request of the United States.

Trudeau also accused China of "not respecting the principles of diplomatic immunity" in one of the cases.

Asked about Trudeau's comments, China's Foreign Ministry spokesperson Hua Chunying said that the "relevant Canadian person" should "earnestly study" the Vienna Convention before speaking, so as to "not become a laughing stock."

"No matter how you look at it, Michael Kovrig does not have diplomatic immunity under the Vienna Convention," she said.

Kovrig is not now serving as a diplomat and had entered China on his most recent trip on a regular passport and business visa, she said.

Kovrig was one of two Canadians detained in China days after the Dec. 1 arrest of Meng Wanzhou, the chief financial officer of Huawei Technologies Co, in Vancouver, at the request of the United States.

Watch: Trudeau talks about the detained Canadians — and diplomatic immunity

Prime Minister Justin Trudeau accuses China of violating Canadian Michael Kovrig's diplomatic immunity for arresting him in China last month and holding him with limited consular access. 1:00

The other Canadian held in China is businessman Michael Spavor.

China has not directly linked its arrest of the two Canadians with Meng's arrest in Canada. It says the two men are being investigated in accordance with Chinese law.

But Beijing-based Western diplomats have called the detentions a clear reprisal for Meng's arrest and have said the two are political hostages being used as leverage by Beijing.

Huawei, the world's largest supplier of telecommunications network equipment, has become the focus of intense scrutiny by Western countries concerned about its relationship with the Chinese government.

The United States has suggested the company's equipment could be used by Chinese authorities for spying.

U.S. authorities allege Meng deceived international banks into clearing transactions with Iran by claiming that two companies that did business with Iran were independent of Huawei.

However, corporate filings and other documents found by Reuters in Iran and Syria show that Huawei is closely linked to both firms.