Two Canadian nationals have been released from Chinese detention and are flying home to Canada, Prime Minister Justin Trudeau has announced.
Michael Spavor and Michael Kovrig were accused of espionage in 2018, shortly after Canadian police arrested a top Chinese tech executive on a US warrant.
The Huawei executive, Meng Wanzhou, left Canada on Friday after a deal with US prosecutors.
The detentions have sparked years of diplomatic tensions.
Critics accused China of detaining the Canadians in retaliation for the arrest of Ms Meng, to use as political bargaining chips. Beijing strongly denied this.
The two men had maintained their innocence throughout. At a news conference, Mr 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.”