09/15/2016 04:22 EDT | Updated 09/15/2016 06:14 EDT

Kevin Garratt Released From Chinese Prison 2 Years After Arrest

Trudeau raised issue during official visit.

OTTAWA — Canadian Kevin Garratt has been freed from a Chinese prison and is back home with his family.

Garratt was detained in August 2014 along with his wife, Julia, who was later freed, on suspicions they were gathering military intelligence. The Garratts had lived in China for more than 30 years and had run a coffee shop since 2008 in Dandong, which borders North Korea.

Kevin Garratt, Julia Dawn Garratt, Hannah Garratt and Simeon Garratt are seen in this undated handout photo.

A government official said the Liberals were "delighted Kevin is home now, and reunited with his family." Garratt arrived in Vancouver Thursday.

His release comes one week before Chinese Premier Li Keqiang is scheduled to visit Canada.

In a statement, Prime Minister Justin Trudeau said he was delighted Garratt had returned safely to Canada and was reunited with his family once more.

"We remain deeply impressed by the grace and resilience of the Garratt family, especially Kevin and Julia," the prime minister said.

Chinese Premier Li Keqiang shakes hands with Prime Minister Justin Trudeau at a news conference in Beijing, China, on Aug. 31, 2016. (Photo: Adrian Wyld/CP)

"The Government of Canada has been seized of this case at the highest levels," he added, thanking consular officials who had worked behind the scenes.

Government officials declined to say how the government managed to secure his return. The Conservatives had actively tried for more than a year.

Foreign Affairs Minister Stéphane Dion and Trudeau continuously raised Garratt's case at the highest levels, he said. "I'm not going to interpret what people were thinking, we're just glad he's back."

In a statement, the family said it "thanks everyone for their thoughts and prayers, and also thanks the many individuals who worked to secure Kevin's release."

Allegations seen as retaliation

The allegations against the Garratts were widely seen as a retaliation and bargaining tactic after Canada arrested a Chinese man in Vancouver named Su Bin. He was wanted by American authorities who believed he had hacked computer networks to obtain military secrets.

Su was arrested five weeks before the Garratts' detention. Earlier this year, Su waived extradition and reached a plea agreement with U.S. prosecutors.

The Garratts' eldest son, Simeon, called the allegations at the time "absurd." When they were not serving customers, his parents spent their time helping locals practice their English and raising money for a charity they had established to help North Koreans, he said.

In February 2015, Julia was freed on bail and she later returned to Canada. But Kevin, whose health was deteriorating, was indicted on charges he had helped Canadian espionage agencies gather military intelligence on China.

Story continues after slideshow:

Photo gallery Canadians Detained In China Over Alleged Espionage See Gallery

During Trudeau's visit to China earlier this month, the Chinese premier promised that Garratt would be treated lawfully and humanely, according to Reuters.

"For these cases, the departments of both sides will continue to remain in touch and we believe it's essential for our two countries to remove disturbances and work together to uphold the other interests of China-Canada relations," Li said.

In a statement, Garratt's family responded that they were "extremely frustrated and disappointed" by the lack of progress in securing his release.

PM pushing closer ties with China

The family "implores the Canadian and Chinese leadership to set aside their differences and reach a resolution to allow Kevin to exit China and obtain critically needed medical treatment and to return to his family," they said.

Further incarceration would be detrimental to his health, they said.

At the time, Trudeau said that he had highlighted a number of consular cases, including Kevin Garratt’s, and looked forward to a closer collaboration with China.

With files from The Canadian Press

Also on HuffPost

Photo gallery Trudeau Visits China See Gallery