OTTAWA -- A federal judge has called for a comprehensive review after ruling Canada's spy service failed to disclose its reliance on information that was likely collected illegally in support of warrants to probe extremism.

In his ruling released Thursday, Federal Court Justice Patrick Gleeson found the Canadian Security Intelligence Service breached its duty of candour to the court, part of a troubling pattern dating back years.

"Having approved operations that were on their face illegal, the service then collected information which in turn was put before this court in support of warrant applications, without notifying the court of the likely illegality," Gleeson's ruling said.

"The circumstances raise fundamental questions relating to respect for the rule of law, the oversight of security intelligence activities and the actions of individual decision-makers."

Gleeson said a federal review must look at interactions between CSIS and the federal Justice Department to fully identify systemic, governance and cultural shortcomings and failures.

Anything less will fall short of ensuring that confidence and trust in the spy service as a key national institution are restored and enhanced, he said.

Federal ministers responsible for security and justice swiftly announced they had asked the national intelligence watchdog to look into the judge's findings.

CSIS director David Vigneault told a news conference that he takes the findings "very seriously" and that the service must do everything it can to ensure it has the court's confidence.

The ruling flows from the spy service's efforts to investigate foreign fighters -- Canadian citizens who might return to Canada after travelling abroad to take part in extremism. In one case, CSIS paid someone known to be facilitating or carrying out terrorism an amount totalling less than $25,000 over a few years, the judge said.

At times, CSIS needs to pay such sources or provide them with logistical support such as a cellphone, said Vigneault, characterizing these as activities as "routine, bread-and-butter practices" of intelligence agencies.

For several years, CSIS relied on the legal doctrine of Crown immunity as a defence against criminal liability while engaging in these activities, he noted.

Gleeson said reliance was placed on the doctrine despite CSIS's having been advised by senior counsel that it was "not consistent" with the law governing the spy service.

CSIS continued to rely on Crown immunity in the face of "unambiguous direction" from the government that the service "must observe the rule of law in discharging its responsibilities," the judge added.

"And this was done with the apparent acquiescence of the Department of Justice," Gleeson said. "While the evidence discloses that the operational activity in issue was reported, in some instances belatedly, to the minister, the reporting was couched in the language of 'high legal risk' -- not illegality."

The ruling comes four years after the Federal Court found CSIS illegally held onto potentially revealing electronic data about people who posed no security threat and breached its duty to inform the court of the data-collection program.

In the latest ruling, Gleeson said he appreciates the challenges of safeguarding Canada's national security.

"Despite these challenges, this court and the Canadian public must have confidence that respect for the rule of law is and remains a foundational principle underpinning all national security intelligence decision-making," he wrote.

"The circumstances disclosed here suggest a degree of institutional disregard for -- or, at the very least, a cavalier institutional approach to -- the duty of candour and regrettably the rule of law."

In a joint statement, Public Safety Minister Bill Blair and Justice Minister David Lametti said they are determined to uphold the practice of protecting Canadians "in a manner that is compliant with the law."

The ministers have written the chairman of the National Security and Intelligence Review Agency to request that it look into the findings and provide recommendations on how to address the concerns raised by the court's decision.

They have also asked the agency to make regular progress reports to the National Security and Intelligence Committee of Parliamentarians.

In addition, the government has hired an external adviser, former Supreme Court justice Ian Binnie, to help with the implementation of the review agency's recommendations within Justice Canada.

Blair told the news conference that Vigneault had assured him CSIS is putting in place "concrete measures" to address the issues raised by the court.

The government said while it is fully committed to addressing the court's recommendations, it will also appeal the ruling "on narrow but important legal grounds" concerning solicitor-client privilege and the government's ability to provide and obtain legal advice in the future.

This report by The Canadian Press was first published July 16, 2020.