Chinese telecoms executive Meng Wanzhou, the Chief Financial Officer with Huawei, was freed today after three years of house arrest in Canada.
It followed an agreement with the US Justice Department to suspend the fraud charges against her that had poisoned Beijing's relations with Washington and Ottawa.
Ms Meng is the 49-year-old daughter of Ren Zhengfei, the billionaire founder of world-leading telecoms equipment supplier Huawei.
She was granted release in a Vancouver court hearing, hours after US prosecutors announced an agreement in New York under which charges are to be suspended and eventually dropped.
The Huawei CFO is now free 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.
Canadian officials can now hope her freedom will lead to China releasing two Canadians, businessman Michael Spavor and former diplomat Michael Kovrig.
They were arrested and imprisoned on espionage charges in the days after Ms Meng was detained, in what China's Western critics branded "hostage diplomacy".
"I would like to express my sincere gratitude to the Chinese embassy in Canada for their constant support," Ms Meng told reporters after the hearing in Vancouver.
"Over the past three years, my life has been turned upside down. It was a disruptive time for me as a mother, wife and a company executive," she said.
"But I believe every cloud has a silver lining. It really was an invaluable experience in my life," she said.
"The saying goes, the greater the difficulty, the greater the growth."
The resolution of the case removes a deep thorn in the relationship between Beijing, Washington and Ottawa, with China accusing the United States of a political attack on one of the Asian giant's technology titans.
Beijing, meanwhile, accused Ottawa of doing Washington's bidding by arresting and holding Ms Meng, who was known inside Huawei as the "princess" of the company and its possible future leader.
Following her 2018 arrest in Vancouver, she was confined to a palatial mansion with an ankle bracelet for monitoring her movements in the western Canadian city, as she fought extradition to the United States.
The United States had accused her of fraud against HSBC bank and wire fraud, saying she tried to hide violations of US sanctions on Iran by Huawei affiliate Skycom.
It said Huawei routed Skycom-linked payments through the US banking system, tying it to the sanctions violations, and said that Ms Meng had served on the Skycom board.
But today, US prosecutors settled for Ms Meng agreeing to a statement of facts in the case.
In exchange, they agreed to defer the charges - which carried the risk of up to 30 years in prison - until 1 December, 2022, and then drop them if she abides by the terms of the agreement.
"In entering into the deferred prosecution agreement, Meng Wanzhou has taken responsibility for her principal role in perpetrating a scheme to defraud a global financial institution," acting US Attorney Nicole Boeckmann said in a statement.
"Meng's admissions are evidence of a consistent pattern of deception to violate US law," said FBI Assistant Director Alan Kohler.
The charges and Ms Meng's arrest were enmeshed in a broader campaign against Huawei, a private firm that Washington says is closely tied to the Chinese government and People's Liberation Army.
US officials say Huawei's phones, routers and switching equipment, used widely around the world, offer Chinese intelligence a potent backdoor into global communications.
US government agencies are banned from buying Huawei equipment, and Washington has pressured allies to follow suit.
But Beijing said the US attack is driven by politics and a desire to harm Chinese economic power.
The resolution of the US case, Canadians hope, will lead to releasing the "Two Mikes" held for nearly three years.
Both were put on trial in March this year. In August, Spavor was sentenced to 11 years in prison, while there has been no decision in Kovrig's case.
Canadian Prime Minister Justin Trudeau denounced Spavor's sentence as "unacceptable and unjust," and said the charges were "trumped up."