For Charles Mwangi, the past five years have been "mental torture," a series of bureaucratic hurdles and sleepless nights barrelling toward his possible deportation.

But on Saturday night, he felt something that had previously proven elusive: relief.

"I have experienced that torture for five years, then (Saturday) was the greatest day that I had ever seen something good in Canada," he said in an interview.

"I slept like a baby."

Hours before he was set to be deported on Sunday morning to Kenya, a country where he said he fled persecution as a bisexual man, Mwangi received a call that his deportation order had been cancelled. After a wave of petitions, protests and an emergency application to the United Nations, his pleas had been answered.

While grateful, he wondered why he had been made to endure years of anguish and uncertainty only for an intervention to come in the eleventh hour.

"Why all this denial?" he asked.

It was a near-miss for the 48-year-old who had exhausted nearly all his options to stay in Canada since he arrived in 2019 on a visitor visa and applied for asylum. His asylum claim and subsequent appeals had all been denied, despite the risks he said he faced as a bisexual man returning to Kenya.

There, Mwangi said he fled abuse and death threats and feared he would be killed if he returned. Those threats continued to come in from abroad even while he lived in Canada, he said, and his wife and three children in Kenya were forced into hiding.

Mwangi made a last-ditch request last week for the United Nations Human Rights Committee to intervene in his case. It was unclear whether that application factored into his cancelled deportation order.

A copy of his UN application said his claim was initially denied in Canada because the adjudicator did not find Mwangi to be a credible bisexual man despite his sworn testimony, the testimony of a man he was said to be dating in Toronto and his activism with local LGBTQ+ organizations.

Mwangi, who worked as personal support worker at a long-term care home during the pandemic, said he felt "hated" by the Canadian government. His activism and the notoriety of his case, which was also covered by media in Kenya, placed him at even greater risk of violence if he were sent back, he said.

"They were putting me on a flight back to my own country where I could have faced a lot of persecution and torture," Mwangi said.

Kenya criminalizes same-sex relationships, and human rights groups there have reported widespread cases of discrimination, harassment and violence against LGBTQ+ people, with police often cited as one of the major perpetrators.

Mwangi said he has been issued a one-year temporary resident permit and is waiting to hear whether Canada will grant him permanent resident status on humanitarian and compassionate grounds. If that application is denied, he could again face deportation next year.

Migrant rights' campaigner Diana Da Silva said the last-minute intervention in Mwangi's case is the exception. Others who face deportation orders are forced into hiding because it's not an option to go back to the countries they fled, she said.

"If you're giving them an option to go back home to death or to nothing, versus staying here undocumented and not having any rights, our people will choose to stay," said Da Silva, an organizer with Migrant Workers Alliance for Change.

The Liberal government announced in 2021 it would explore how status for undocumented workers in Canada could be regularized. Recently, however, Immigration Minister Marc Miller walked back plans for a broad pathway to permanent resident status for the 300,000 to 600,000 undocumented people he estimates live in Canada.

Migrant rights' groups have long noted the issues faced by undocumented people in Canada, including labour exploitation and barriers to health care and social services.

The ways people end up without status are varied, from overstaying temporary work and study permits to being denied asylum claims.

Miller, who has characterized a regularization pathway as a humanitarian and economic benefit in previous media interviews, has also cast the issue as divisive in Canada, and in the Liberal caucus.

His office declined to comment on Mwangi's case, citing privacy legislation. A spokeswoman restated that a broad regularization program would not be pursued.

"The department is continuing to explore alternative options and further developments," Aissa Diop said in a written statement.

Da Silva, of the Migrant Workers Alliance, said the backtracking appears to be part of a larger shift in the government's immigration policy. That includes, she said, recent caps on international students, reimposing visa restrictions on Mexico, reducing temporary foreign workers, and a ramp up in deportations.

Mwangi said his own struggle is part of what compels him to further his advocacy for undocumented people. He is set to lead a demonstration in Toronto next month as part of a Canada-wide action against racism and for immigrant justice.

"You don't have a life, and you are never happy because you live in uncertainty. You know what can happen tomorrow," he said of life while undocumented.

"Maybe the (Canada Border Services Agency) will come to your door. Maybe the police will come to your door. Maybe the people who know you're undocumented will come hunting you. You feel hated and you don't feel like a full human being."

While the threat of deportation still looms, Mwangi said he is hopeful.

He "loves" his community in Toronto's Jane and Finch area and his church is near his apartment, Mwangi said. He enjoys the work he does as a support worker and housekeeper at two downtown shelters, including a youth shelter.

"I can see the light at the end of the tunnel," he said. "If my deportation was extended for one year, then maybe miracles can happen again."

- with files from Rianna Lim.

This report by The Canadian Press was first published Aug. 27, 2024.