Bashir Makhtal was sentenced to life in prison for terrorism-related charges after a trial that Amnesty International and Makhtal’s lawyer called unfair.

He was greeted by friends, family and supporters at Toronto’s Pearson airport on Saturday after flying in from the Ethiopian capital, Addis Ababa.

Canadian officials had been working for years to secure his release, but Gloria Nafziger, a campaigner with Amnesty, said the changing political situation in Ethiopia has led to the release of thousands of political prisoners in recent months.

“It’s an optimistic time in Ethiopia for people who have been detained for political reasons,” said Nafziger, adding that the changing tides in Ethiopian politics and the country’s new prime minister were likely major reasons for Makhtal’s release.

The releases started this year under former prime minister Hailemariam Desalegn, who announced in January that he would drop charges against political prisoners and close a notorious prison camp in an effort to foster political dialogue. They have continued under the new prime minister, Abiy Ahmed, who was sworn in on April 2nd.

Makhtal was born in Ethiopia and settled in Canada after moving here as a refugee, and later moved to Kenya where he operated a used-clothing business.

He was working in Somalia in 2006, but fled back to the Kenyan border when Ethiopian troops invaded. He was detained at the border and summarily deported to Ethiopia, a move that Amnesty International called unlawful.

In 2009, Makhtal was convicted of terrorism-related crimes and was handed a life sentence without the ability to communicate with anyone outside of prison.

Amnesty International said Makhtal reported multiple cases of torture and ill-treatment during his imprisonment, including a lack of prompt care for his medical needs.

Nafziger said the Canadian government was working for years to try and negotiate Makhtal’s release. An access to information request by The Canadian Press in 2009 found hundreds of pages of records revealing the government’s frustrated efforts to assist him.

“There were constant efforts being made,” said Nafziger. “They would raise it in diplomatic meetings with the Ethiopian government constantly… There’s been, in the last few years, a really high-profile attention being paid.”

At one point, Nafziger said that Ethiopian and Canadian officials had agreed on a prisoner transfer, but Makhtal refused, saying he was not guilty and would not come back to Canada just to be put behind bars again.

Makhtal’s cousin, Said Maktal, said in an Amnesty International statement that his cousin’s release has been a long time coming.

“We hardly are able to believe it is true,” said Said Maktal, who was involved in campaigning for Makhtal’s release. “We send our thanks to everyone who signed a petition, wrote a letter or came to a public event about Bashir’s case.”