After a two-year battle with Transport Canada, Ayaan Farah could have her security clearance and job restored.

A Federal Court judge quashed the decision to revoke the US Airways employee’s security clearance, because Transport Canada failed to give her enough information to defend herself against allegations of links to individuals with criminal records.

The decision was “both procedurally unfair and substantively unreasonable,” Justice Susan Elliott wrote in a ruling released Monday. Elliott sent the matter back to the federal Minister of Transport Marc Garneau to be considered again in light of her ruling.

Elliott’s ruling comes seven months after a federal court hearing and almost two years since Farah’s security clearance was revoked in late 2014, effectively resulting in her losing her job of eight years at Pearson International Airport.

In an interview, Farah said she is elated by the ruling but exhausted by how long the process has taken.

“It’s hard to fight something when you don’t even know what is being held against you... I didn’t do anything wrong,” she said. “But I hope this (ruling) will encourage others to come forward. I’m not the first person this has happened to and I’m not the last... This doesn’t stop here.”

Transport Canada’s decision was based on two “sparse allegations” provided by the Toronto police in 2014 as part of a security review, Elliott wrote.

Once in 2011, Farah was seen with Subject A, a gang member with a criminal record who “admitted at the time to being a close associate to Farah.” The information was obtained through a “direct interaction,” according to the police review, which does not indicate how Farah’s identity was established beyond the statement of Subject A.

The second piece of information from the police review was that a car registered to Farah left a funeral for a known gang member carrying two people with criminal records. She was not in the vehicle, according to the information police provided.

“These sparse allegations are unique in the annals of security clearance revocation cases,” Elliott wrote.

In the case law, usually the person who loses their clearance has direct involvement in a criminal matter, or at a minimum, a clear and ongoing relationship with someone engaged in serious criminal activity, Elliott wrote.

But without enough information for her to identify Subject A, Farah could not meaningfully explain their relationship that may have been formed with no knowledge of Subject A’s criminal activities, or that no such relationship existed.

“Instead, she was forced to give a blanket denial of having any criminal associates,” Elliott wrote.

Elliott criticized Transport Canada for an “improper blanket reliance on the Privacy Act” when responding to Farah’s request to know who Subject A was and the date and location of the interaction.

In fact, Transport Canada fundamentally changed Farah’s questions when they passed on her request to the RCMP, instead asking for “any further information related to the method by which this information was received by police,” Elliott found.

As a result, the RCMP’s answer did not address Farah’s questions.

Transport Canada then gave Farah a “somewhat misleading” response, blaming the Privacy Act for being unable to provide names of details of third party individuals or sources, Elliott wrote.

Loading... Loading... Loading... Loading... Loading... Loading...

“If Ms. Farah’s questions had been properly posed to the police, then they might have relied on the Privacy Act, but they also might have provided more details.”

Some details that might have been helpful, the judge suggested, include the gender of Subject A, their age, their nationality, the city, country or province where they were seen together, the time of day, what season of the year, whether the interaction was indoors or outdoors, the date and who was present.

Elliott also slammed the conclusion that it was “unlikely that an individual would have no recollection of a direct interaction with police,” a conclusion that suggests Farah is lying.

That conclusion assumes the police officer was identifiable and in uniform – but there is no evidence of that, and if that were the case there would be no reason not to provide more information about the interaction since there is no source to protect, Elliott wrote.

If the officer was in plain clothes or unidentifiable as a police officer, it is unlikely Farah would remember such an interaction from more than two years ago, she wrote.

Or, she suggests, it could have been a case of mistaken identity given evidence that Farah’s cousin has impersonated her in the past.

The advisory body failed to consider those points, leading to a decision that was “not intelligible or transparent,” she found.

Farah’s lawyer Mitchell Worsoff told the Star justice has been served and hopes the ruling will spur changes to the way security clearance decisions are considered — and assist the next time a case like Farah’s comes before the courts.

Transport Canada said they would not be able to respond to questions until Tuesday. The decision can be appealed.

Correction – August 16, 2016: This article was edited from a previous version to update an incorrect photo caption.