Two Canadians who had been arrested on spying charges in China have been released from jail. That comes just hours after news became public that Huawei's CFO Meng Wanzhou reached an agreement with U.S. prosecutors to end the bank fraud case against her. Meng spoke outside a Vancouver courtroom shortly before flying home to China. "Over the past three years, my life has been turned upside down.""But I believe every cloud has a silver lining."Beijing has repeatedly denied the two cases were linked, though Canadian Prime Minister Justin Trudeau accused China of engaging in 'hostage diplomacy'. Businessman Michael Spavor and diplomat Michael Kovrig were arrested shortly after Meng was in 2018.They were held in Chinese jails for more than a thousand days. In August, Spavor was sentenced to 11 years in prison. But on Friday Trudeau confirmed the pair's release by Beijing, though it was unclear whether a bilateral deal had been struck."The aircraft carrying Michael Kovrig and Michael Spavor left Chinese airspace and they're on their way home.""These two men have gone through an unbelievably difficult ordeal. For the past thousand days, they have shown strength, perseverance, resilience and grace, and we are all inspired by that."The years-long extradition saga has been a source of increasing tension in Sino-U.S. relations.Meng was arrested on bank and wire fraud charges and placed on house arrest in Vancouver, where she had been fighting extradition to the U.S. ever since. Chinese officials had signalled that Meng's case needed to be dropped to help end a diplomatic stalemate. On Friday, Reuters exclusively learned that Washington had reached a deferred prosecution agreement with Meng - effective until 2022.The charges will then be dropped as long as she doesn't break the law. But Friday's deal only pertains to Meng.The Department of Justice said it will continue to prepare for trial against Huawei.A spokeswoman for Huawei declined to comment, while China's Foreign Ministry could not be reached for one.