One day before he was set to be deported to Kenya, Charles Mwangi was granted temporary residency.

Mwangi, 48, fled his home to Canada five years ago to escape persecution since he is bisexual, and Kenya criminalized same-sex relationships.

After protesting, petitioning and filing an emergency application to the United Nations Human Rights Committee, Mwangi has been granted a one-year temporary resident permit by Immigration, Refugee and Citizenship Canada.

"I'm so happy today, we have won. My deportation has been cancelled and I'm calling on the government to regularize anyone who is undocumented because this journey is not a joke, it's a nightmare," Mwangi said in a release issued Saturday. He was scheduled to be deported on Sunday morning.

The father of three claimed asylum in Toronto's Jane and Finch neighbourhood, and has worked the front lines of the pandemic as a personal support worker and health care worker of Migrant Workers Alliance for Change.

Mwangi and his supporters protested his deportation order earlier this week, outside of his local MP Judy Sgro's office, to fight for his right to stay. He eventually pleaded his case inside his MP's office and delivered the petition – of which more than 4,600 people signed, imploring the federal government to step in and halt the deportation order.

"Thank you to everyone who supported me and took action," Mwangi said.

Diana Da Silva, organizer at the Migrant Workers Alliance for Change, said while this is a victory for Mwangi, they should not have had to fight this hard.

"Stopping Charles’s deportation is a victory for migrant and queer justice and the power of community action. But, we should not have had to fight to stop his deportation, we call on Prime Minister (Justin) Trudeau to keep his promise and regularize all undocumented people," Da Silva said in a release.

Earlier this year, in May, Trudeau acknowledged some immigrants who lack official status need better supports to help them stay in the country.

"There needs to be either a pathway towards regularization and citizenship, which I know the (immigration) minister is working on," Trudeau said, while also noting other cases need deportation proceedings accelerated.

In 2021, the federal Liberals pledged to find ways to regularize permanent status for undocumented workers who contribute to Canadian communities. The prime minister said he had no timeline for when this will actually be enacted.

Mwangi is set to protest this inaction, leading a demonstration in Toronto on Sept. 15.

With files from CTV News Toronto's Beth Macdonell and The Canadian Press