A diplomatic row between China and the West appears to be ending, after the release of two Canadians held in China and a Chinese tech executive in Canada.
Huawei executive Meng Wanzhou, arrested on a US warrant in 2018, left Canada on Friday in a deal with US prosecutors.
Hours later it was announced that Michael Spavor and Michael Kovrig, accused of espionage by China in the same year, were flying home to Canada.
Beijing denies detaining the Canadians in retaliation for Meng's arrest.
But critics have accused China of using them as political bargaining chips.
The two men had maintained their innocence throughout. At a news conference, Canadian Prime Minister Justin Trudeau said they had been through "an unbelievably difficult ordeal".
"It is good news for all of us that they are on their way home to their families," he added. "For the past 1,000 days, they have shown strength, perseverance, resilience and grace."
The prime minister said both men will arrive in Canada early on Saturday. They are being accompanied by Dominic Barton, Canada's ambassador to China.
Before her release, Meng - the daughter of Ren Zhengfei, the billionaire founder of Chinese telecoms giant Huawei - admitted misleading US investigators about Huawei's business dealings in Iran.
She spent three years under house arrest in Canada while fighting extradition to the United States.