OTTAWA - CSIS has recruited some Defence Department technical wizardry to sidestep legal limits on its ability to spy on Canadians travelling abroad.

Details of a Federal Court ruling released Tuesday provide a glimpse of the highly advanced tools used by spies in the fight against terrorism and espionage.

A groundbreaking decision by Justice Richard Mosley reveals the Canadian Security Intelligence Service obtained a warrant to monitor two suspects considered threats to Canada late last year.

When it got wind the pair were leaving the country, CSIS won court approval to employ the secretive Communications Security Establishment, a wing of National Defence, to ensure the interceptions could continue.

An earlier court ruling had made it clear that CSIS could not legally carry out foreign eavesdropping without approval from the country in which the spying takes place.

However, with the help of CSE's extraordinary technical means, the interceptions would be "controlled from within Canada," Mosley said, making the operation legal.

"Information which may be crucial to prevent or disrupt the threats may be unavailable to the security agencies of this country if they lack the means to follow those lines of communication," Mosley wrote.

The Ottawa-based CSE collects and processes telephone, fax and computer communications of foreign states, corporations and individuals. The federal government uses intelligence gleaned from the interceptions to support troops abroad, catch terrorists and further Canada's economic goals.

CSE is generally prohibited from spying on Canadians, but it can assist CSIS and police agencies acting under judicial warrants.

Although CSIS enlisted CSE in intercepting the telephone calls of Canadians travelling outside the country, the actual eavesdropping would legally take place "at the locations within Canada where the calls will be acquired, listened to and recorded," said Mosley's reasons, made public Tuesday.

It is unclear what other kinds of intelligence-gathering might have been involved, but Mosley's decision makes it clear CSIS also hoped to benefit from CSE's ability to collect information though other electronic means.

"Information found . . . would only be `seized' where it would be first read, in Canada," says the judge's heavily censored reasons.

Bill Robinson, a longtime observer of CSE, said the operation could include infiltrating foreign computers remotely to "poke around inside" and pull out information of interest, much the way criminal hackers do.

"I think that involves essentially making intrusions into computers."

In January, CSIS filed an application on "urgent grounds" in light of the two Canadians' travel plans.

Mosley approved a three-month warrant after a Saturday court session, where he heard from CSIS and a CSE expert who described the electronic spy agency's interception capabilities. In April, the judge extended the warrant for an additional nine months.

CSIS spokeswoman Manon Berube said the decision recognizes that security threats move easily from one country to another, and that countering those threats required a new approach.

"This ruling is important because it recognizes that security threats are global and highly mobile. CSIS can now use this tool to defend Canada's security."

Berube declined to elaborate on the nature of the operation for which CSIS obtained warrants. But she said the techniques approved by the court could apply to all kinds of security investigations.

"I can't go into any operational detail, but I wouldn't limit that to counter-terrorism. I would say it applies to all threats," including spies or terrorists.

CSE spokesman Adrian Simpson also refused to discuss specifics of how and when the agency assists CSIS. He rejected any suggestion the ruling allows CSE to do things it otherwise cannot do under the law. "We're simply providing technical assistance to CSIS."

Intelligence historian Wesley Wark said the court decision could help Canadian spy agencies resist "some temptations and potential abuses."

In the past, Canadian spies, lacking a legal mandate to eavesdrop on citizens abroad, might have simply handed the chore to the spy service of another country -- a move that could have opened the door to dodgy practices, he said

Wark noted CSIS has evolved into a very different agency over its 25-year lifespan, now fighting terrorism and international criminals as well as traditional spooks. But the law governing CSIS hasn't been updated, leaving the courts to clarify what the agency can and cannot do.

"It's not entirely clear what the intention of Parliament is anymore."