Michael Kovrig (r) and Michael Spavor have been held since 2018
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 Ms 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, Ms 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.
Speaking after the executive's release, a Chinese Foreign Ministry spokeswoman said the charges against Ms Meng were fabricated.
State media quoted Hua Chunying as saying the case was "act of political persecution against Chinese citizens".
Emotional Djokovic hails biggest victory of his Life
Where to Go for Your Next Coffee Break in Lusail?
Why was Qatar the Most Successful Host of the FIFA World Cup?
Three two-toed sloth freeze to death at Belgium airport en route to Malaysia