The chief financial officer of Chinese telecoms giant Huawei has been granted bail by a Canadian court.
Meng Wanzhou was arrested on 1 December and could be extradited to the US to face fraud charges linked to the alleged violation of sanctions on Iran.
A judge in Vancouver set bail at C$10m (£6m; $7.4m). She will be under surveillance 24 hours a day and must wear an electronic ankle tag.
Ms Meng, 46, is the daughter of Huawei’s founder.
Her detention has angered China and soured its relations with both Canada and the US.
At the three-day bail hearing in Vancouver, her lawyers sought to provide guarantees that she would not pose a flight risk if released. The application was opposed by Canadian prosecutors.
Ms Meng is accused in the US of using a Huawei subsidiary called Skycom to evade sanctions on Iran between 2009 and 2014.
US prosecutors say she had publicly misrepresented Skycom as being a separate company and deceived banks about the true relationship between the two companies.
Ms Meng has denied any wrongdoing and said she will contest the allegations.
Applause broke out in the courtroom when Justice William Ehrcke granted bail. Ms Meng cried and hugged her lawyers.
The judge ordered her to reappear in court on 6 February.
After the ruling, Huawei issued a statement, saying: “We have every confidence that the Canadian and US legal systems will reach a just conclusion.”
China had threatened severe consequences unless Canada released the Huawei executive.
Earlier on Tuesday it emerged that a Canadian former diplomat had been detained in China.
Michael Kovrig’s current employer, the International Crisis Group, said it was working for his prompt release. There has been no official word from China about his whereabouts.
Prime Minister Justin Trudeau said Canada was in direct contact with Chinese authorities concerning the case.
Mr Kovrig previously worked as a diplomat in Beijing, Hong Kong and at the UN in New York.
Canadian officials said there was no “explicit indication” of any link between Mr Kovrig’s reported detention and the arrest of Ms Meng.