After languishing for more than two years in a North Korean prison, a Canadian pastor was released Wednesday, according to the country’s state news agency.

Hyeon Soo Lim, 62, a pastor with the Light Korean Presbyterian Church in Mississauga, Ont., had travelled to North Korea more than a hundred times, leading humanitarian programs and even opening an orphanage. But during his last trip in 2015, he was detained and charged with attempting to overthrow North Korea’s regime using religion.

In what is believed to be a coerced statement, Lim soon admitted to the crimes after being sentenced to hard labour for life.

“There were rumours that he was affiliated with the uncle that Kim Jong Un had executed a few years back, and that was partly the reason for his incarceration," Jack Kim, a senior advisor with HanVoice, a Canada-based human rights organization that assists North Korean refugees, recently told CTV News.

Then, two years and dozens of delicate diplomatic communications later, a Canadian delegation led by Daniel Jean, a national security advisor to Prime Minister Justin Trudeau, travelled to Pyongyang this week to discuss Lim’s case in person.

"Pastor Lim’s health and well-being remain of utmost importance to the Government of Canada, and we are working to ensure that he receives any required medical attention," the Prime Minister's Office said in a statement.

That delegation was pivotal towards securing Lim’s release, Ontario MPP Raymond Cho said.

“It is important that Kim Jong Un got the representatives from Canada, so we saved his face,” Cho, who is Korean-Canadian, told CTV News. “It is a very good gesture.”

Since being imprisoned, Lim’s health was reportedly failing. He suffers from high blood pressure and allegedly lost nearly 40 kilograms while incarcerated.

According to North Korea’s news agency, Lim was released on “sick bail.”

Lim’s release comes just weeks after North Korea freed 22-year-old American student Otto Warmbier, who was imprisoned in 2016 after allegedly trying to steal a propaganda poster. Brought home in a coma with obvious signs of torture, Warmbier died on June 19, just six days after arriving in the U.S.

"I am sure the North Koreans, they don't want to see the same thing with Reverend Hyeon Soo Lim, so that might be the deciding factor,” Cho added.

There is, however, still no timeline for when Lim will be returned to Canada. His current whereabouts also remain unknown. As for his health issues, the North Korean government has not given any indication of just how sick the pastor has become.

Lim’s parishioners say that have never lost faith and never stopped praying since their pastor was imprisoned in North Korea. But when word spread that Lim had finally been released on Wednesday, many met the news with disbelief.

“When I made the announcement this morning at service, they were like, ‘Are you sure that's true?’" associate pastor Charles Baik told CTV News.

Amongst his family and parishioners, concerns still remain that speaking out about the case could jeopardize Lim’s release. But it may come as some solace to Lim’s congregation and family that when a U.S. diplomat recently went to North Korea to retrieve Warmbier, he reported seeing Lim and said that he was still able to stand.

Lim, who has a wife and son in the Toronto area, formed the Light Korean Presbyterian Church nearly 30 years ago, soon after emigrating to Canada from South Korea.

With reports from CTV’s Peter Akman and The Canadian Press