Adel Benhmuda, his wife Aisha Benmatug and their four sons, two of whom were born in Canada, were sent back to Libya when their claim for refugee status was denied.
Upon their arrival in Tripoli, Adel Benhmuda was taken into custody by Libyan police and spent the next four months in Ain Zara prison where he was tortured.
In a scathing decision late last month, Judge Mary Gleason ruled that visa officials at Canada's embassy in Rome were biased in their assessment of the family's application to return to Canada and had placed erroneous information on their file.
She ordered that the information be expunged and that the case be sent to another visa post for reassessment within 90 days.
"It really highlights some of the rogue nature of what goes on at visa posts around the world," said Andrew Brouwer, the family's lawyer in Toronto. Some officer "had the power to go directly against what everyone was saying including the United Nations."
Brouwer called the decision strong and decisive, adding, "I really think that Justice Gleason was so appalled by what had happened that she stepped a little bit outside of what judges normally do in these cases."
Eight years in Canada
The Benhmuda family had originally come to Canada in 2000, saying they felt threatened by Libyan authorities because Benhmuda's brother was linked to a group that opposed the Gadhafi regime.
But eight years later, following a series of hearings, immigration authorities rejected their claim and three weeks after that they were deported to Libya, even though the two youngest boys had been born in Canada.
In an interview with CBC Radio last year, Adul Benhmuda described how he was tortured. "They used to hit me," he said. "A kind of rope and wood stick. They wrapped my feet up and starting hitting them. That was several times a week."
After his release, the family paid a bribe and fled to Malta, where they lived in a refugee camp for almost two years. There they were recognized by the UN High Commission for Refugees as legitimate refugees.
When UNHCR officials saw that two of their sons were Canadian, they asked Canada to take them back. and last year Immigration Minister Jason Kenney said Canadian authorities would do everything they could to help the family and promised authorities would offer "every humanitarian consideration."
But a visa officer with the Canadian embassy in Rome, Laurent Beaulieu, had a much different take.
He alleged that the family had been a drain on Canada's health and social service system and would again be dependent on social assistance, a suggestion Judge Gleason said was wrong.
During his initial time in Canada, Benhmuda had a job with an optician and had supported his family.
The judge also said that "officer Beaulieu additionally ignored the fact that the family was relying on circumstances that had not been considered by [the refugee review process], including the incarceration and torture of Mr. Benhmuda by the Libyan authorities.
"The analysis also fails to discuss the applicants' request for [humanitarian] consideration, the situation in Malta, the family’s ties to Canada and the children's best interests.
It also contains gratuitous comments, like the mention that Ms. Benmatug 'was already in advance state of pregnancy' when the family first sought refuge in Canada," Judge Gleason wrote.
"Citizenship and Immigration Canada "will of course comply with the ruling," Remi Lariviere, a spokesperson for Immigration Minister Kenney, said in a statement to CBC News. "Instructions have been sent to a different visa office as ordered by the court."
But Lariviere said he could not say which office would now handle the case due to privacy restrictions.
The family is now living a hand-to-mouth existence in a small apartment in Malta, and Adel is unable to work, according to Brouwer.
He says that after what the family has been through, their reaction to this latest decision was muted, as if they didn't want to get their hopes up again.
In the meantime, a Mississauga teacher who taught the family's two youngest boys, Adam and Omar, has set up an online petition urging the federal government to bring the family back to Canada as soon as possible.
Ingrid Kerrigan says she was "shocked" when immigration officials turned down the family's claim to remain in Canada.
"Aisha phoned me and she was devasted," she said. "They hadn't believed that her husband Adel was in danger if they sent them back to Libya and I was absolutely floored. We trusted the system to do the right thing this time and it didn't work for whatever reason."
Kerrigan and others in the school and neighborhood raised money to hire a lawyer to try to get the family back.
"They want more than anything to come home," Kerrigan said. "All any of their four sons knows is Canada. That's where all their memories are, their childhood, it's where their best friends are still waiting for them.
"They miss snow, they miss hockey, they miss skating, all those Canadian things."
This month Kerrigan launched the petition on change.org and in less than two weeks, more than 10,000 people have signed the petition.
"We have to show the world that we're a caring and compassionate nation that warrants the international respect that we've earned by doing what's right and just bringing the family home," she said. "They didn't deserve to be deported in the first place."
In an interview with CBC News from Malta, Adel Benhmuda says he is overwhelmed by the support from all his Canadian friends.
"I hope it will be helpful," he said. In the meantime, he said they are trying to remain hopeful that they can return and resume their life in Canada.
The federal government has until mid-January to review the family's case and make a decision.
Also on HuffPost