BRAMPTON, Ont. - A paid RCMP mole who was instrumental in thwarting a domestic terrorist plot acted appropriately despite defence claims he had committed criminal acts, a judge ruled Tuesday.

Ontario Superior Court Justice John Sproat dismissed defence arguments that police informant Mubin Shaikh had entrapped the young man.

"There is no suggestion that it was Shaikh who provided the opportunity to (the youth) to commit the acts which resulted in him being found guilty," Sproat said in his 51-page decision.

"The evidence is overwhelming that (the youth) would have committed the offence if he had never come into contact with Shaikh."

The ruling in the case of the first person to stand trial among the so-called Toronto 18 meant a finding of guilt became a conviction.

The youth, who was 17 at the time of his offences and cannot be named, was found guilty in September of helping and taking part in a terrorist organization.

Sproat said at the time that evidence the terrorist group existed was "overwhelming."

However, the judge agreed to hold off registering a formal conviction pending the outcome of defence arguments that their client was a victim of inappropriate behaviour by Shaikh.

The defence maintained that Shaikh, 33, had entrapped the troubled teen by acting as his mentor and had committed criminal acts during his infiltration of the group, such as illegally firing a gun and helping set up a training facility north of Toronto.

Sproat rejected defence claims that "Shaikh committed a series of criminal offences, and, in effect, led by the example of his own criminality."

"It is self-evident that Shaikh's intent throughout was to report to the RCMP and by so doing disrupt the group and prevent the carrying out of a terrorist attack," Sproat said.

"Shaikh, therefore, in my opinion, did not have the requisite intent to commit any terrorist offence."

Just minutes after the decision a visibly relieved Shaikh said he was "very pleased."

"It does away with another major assumption that it was a setup," Shaikh said. "It refutes very loudly what certain people had been saying."

During the trial, Shaikh insisted the youth, who is now 21, was unaware of the nefarious plans by the group's leaders to carry out horrific acts of violence.

In his ruling, the judge rejected the idea the naive youth was simply caught up in something he didn't understand.

The man's age was "not much of an impediment to understanding the simple truth that a handgun was being fired, military-style exercises were being conducted and (the co-leader) was exhorting the attendees to kick off a battle in which they would kill and perhaps be killed," Sproat said in his ruling.

Shaikh had previously testified to feeling guilty about indoctrinating four teens in extreme jihadist philosophy, but defended his role in stopping a plot he said was serious and potentially deadly.

He couldn't, he said, have blown his cover.

"In my opinion, there is definitely an air of reality to the position that Shaikh is excused from criminal liability by the defence of necessity," Sproat said.

The Crown is seeking to have the youth sentenced as an adult, which could mean a maximum of 10 years in prison. The defence wants him sentenced as a youth.

Shaikh did admit to asking for $2.7 million in tax-free compensation just before a suspect's trial last June, but said he considered it his patriotic duty to inform on the group and testify against its members.

For its part, the Crown argued the teen was already part of the group before Shaikh, a well-versed Muslim, became involved.

Prosecutor John Neander also pointed out that far from entrapping the youth, Shaikh tried to get him to return to his Hindu family but the youth, who had converted to Islam, refused.

Sproat accepted that Shaikh had tried to dissuade the youth from further involvement with the group's co-leader, to no avail.

Three other youths, along with four adults, have since had their charges stayed or withdrawn.

Ten adults, none of whom can be named by court order, have yet to stand trial. Shaikh is expected to be the Crown's main witness in those cases.

Court had heard that Shaikh decided to become an RCMP agent because of a dream he took to be a message from God.

In their testimony, RCMP officers said Shaikh volunteered to attend the training camp to act as the "eyes and ears" of police.