Two Canadians imprisoned in what China's Western critics criticised as "hostage diplomacy" have returned home after being released.

TV footage aired by CTV showed Michael Kovrig and Michael Spavor arriving in Calgary in western Canada and being welcomed and hugged by Prime Minister Justin Trudeau.

'The Two Michaels', as they have become known in Canada, had been arrested and imprisoned on espionage charges in the days after Canada detained Huawei executive Meng Wanzhou.

The seemingly tit-for-tat arrests soured Canada-China relations.

Earlier, a Canadian judge ended extradition proceedings against Meng and lifted her bail conditions, allowing her to return to China for the first time since her arrest in Vancouver's international airport at the behest of US authorities on 1 December 2018.

The Canadian judge's move followed an agreement she made with the US Justice Department to suspend fraud charges against her related to a subsidiary of Huawei selling equipment in Iran in violation of sanctions.

A picture released by Xinhua News Agency shows Meng Wanzhou at Shenzhen airport

The United States applauded the two men's release, with Secretary of State Antony Blinken saying his country was "pleased" by the Chinese move and "stands with the international community in welcoming the decision by People's Republic of China authorities" to free the Canadians.

Both Kovrig and Spavor were put on trial in March this year.

In August, Spavor was sentenced to 11 years in prison, while there had been no decision in Kovrig's case.

Mr Trudeau previously denounced Spavor's sentence as "unacceptable and unjust," and said the charges were "trumped up".

Yesterday, he said: "These two men have gone through an unbelievably difficult ordeal.

"For the past 1,000 days, they have shown strength, perseverance, resilience, and grace … And we are all inspired by that."

Their families at the beginning of September led hundreds of supporters marching 7,000 steps through the Canadian capital - the same number Kovrig said in letters to his family he walked in his small cell every day - to bring attention to their detention.

Representatives of 26 countries had also gathered outside the building in Beijing where his closed-door trial was held in August.

Canadian diplomats were also barred from attending Spavor's trial in the northern city of Dandong.

They had had almost no contact with the outside world since their detention.

Virtual consular visits only resumed in October 2020 after a nine-month hiatus that authorities said was due to the coronavirus pandemic.

China had insisted the detention of the two Canadians was lawful, while calling Meng's case "a purely political incident".

Canada, meanwhile, had rallied allies, including the United States, to decry what it called China's "arbitrary detention" of its nationals.