A Quebec man who told undercover federal agents he wanted to travel to Syria to join the Islamic State wasn't coerced into making the confession, the judge hearing his trial ruled Monday.

A lawyer for Ismael Habib, 29, argued in January the statements made by his client during an elaborate RCMP sting should not be admitted as evidence.

Charles Montpetit alleged Habib was exploited by the RCMP agents who were behind the covert probes designed to glean a confession.

The stratagem is known as a Mr. Big operation, which involves officers posing as criminals to obtain confessions for serious unresolved criminal cases.

Montpetit said the agents didn't follow the strict rules in place for having such statements admitted as evidence.

While Quebec court Judge Serge Delisle agreed the ruse was a sort of modified Mr. Big, he ruled the statements were admissible and were corroborated by other evidence presented by the Crown at Habib's trial on terrorism-related charges.

"The court cannot identify any evidence to conclude the scenarios had a coercive impact on the accused," Delisle concluded. "Nothing demonstrates he said or did anything he did not want to say or do."

The Supreme Court of Canada ruled in 2014 that such operations tend to produce unreliable evidence because of threats and that they are acceptable only under strict guidelines, which Delisle said were met in this case.

The top court said Mr. Big confessions should be excluded where the prejudicial effect outweighs the value of the evidence or where they are the product of an abuse of process.

In Habib's case, prosecutor Lyne Decarie said police were simply trying to pin down his true intentions and that the scenarios didn't include any Mr. Big hallmarks such as threats, real or simulated violence, or promises of money or invitation into a gang.

"Evidently, we wanted the statements to be deemed admissible, so we're satisfied," Decarie said outside the courtroom.

The RCMP operation involved a fictitious crime organization that pretended it could make counterfeit passports and smuggle people out of Canada.

Habib's trial has heard he told undercover agents at least twice he wanted to travel to Syria and join up with the Islamic State, but that the fictitious group wasn't his only possibility.

"Even if the fictitious organization was his most interesting option to leave the country at the time of the investigation, it wasn't the only one," Delisle said.

"The accused clearly indicates to the boss of the fictitious organization that if it takes too much time, he will find another solution to get to Syria."

The Crown completed presenting its evidence earlier this year.

Montpetit, who didn't want to comment on the ruling, did say his defence tactics may change when he begins his turn on Wednesday.