John McCallum has resigned from his post as Canada's ambassador to China at the request of Prime Minister Justin Trudeau.

In a statement Saturday afternoon, Trudeau said he asked for, and accepted, McCallum’s resignation Friday night, mere days before a key deadline on the extradition case against Huawei Chief Financial Officer Meng Wanzhou.

“For almost two decades, John McCallum has served Canadians honourably and with distinction,” Trudeau said in a release.

“I thank him and his family for his service over the past many years.”

The federal government has tasked McCallum’s right hand man in China Jim Nickel, up until now the Deputy Head of Mission at the Embassy of Canada in Beijing, as Chargé d'affaires to China in the wake of McCallum’s resignation. It is unclear if this is a permanent appointment.

McCallum ignited a firestorm earlier this week when he told Chinese-language media Meng had "strong arguments” against extradition. Meng has been under house arrest in Vancouver since late last year. 

McCallum later apologized for the comments about how Meng could avoid extradition.

“I regret that my comments with respect to the legal proceedings of Ms. Meng have created confusion,” he said in a statement Thursday. “I misspoke. These comments do not accurately represent my position on this issue.”

The United States, which requested Canada arrest Meng, has until Jan. 30 to make its extradition request official.

Canadian officials, including Trudeau, have insisted the arrest of Meng was not politically motivated, although U.S. President Donald Trump has said he would consider intervening if that ultimately facilitated a trade agreement with China. 

McCallum's comments prompted a swift backlash from opposition officials, with Conservative Party Leader Andrew Scheer declaring he would fire McCallum if he were Prime Minister.

The file has proven to be a thorn in the side of Trudeau’s Liberals, who sought to cozy up to Beijing earlier in their tenure. China has detained a pair of Canadians, Michael Kovrig and Michael Spavor, in the wake of Meng’s arrest, and has escalated the drug sentence against Canadian national Robert Lloyd Schellenberg to the death penalty. Ottawa says it is committed to securing justice for the Canadian citizens detained in China.