A judge has given the first person ever convicted of helping and taking part in a terrorist organization a 2-1/2 year sentence.

However, the 21-year-old member of the so-called "Toronto 18" was freed from custody shortly after he was sentenced based on credit for time served in custody.

The young man, charged as a youth but sentenced as an adult, will have his identity protected by a temporary publication ban.

He will be under a 10-year weapons prohibition and will have to provide a DNA sample.

When asked about the ban on revealing the offender's name, lawyer Mitchell Chernovsky told reporters outside the Brampton courthouse on Friday that keeping that information out of the public eye is important for his client's future.

"As somebody who's convicted of these offences, he's essentially as stigmatized on a level probably slightly below a child molester," he said.

"How's he supposed to go to school, get work, travel, live his life and rehabilitate himself with that label?"

Chernovsky said his client had a very minimal role in the plot and added that the young man was "very happy" to be out of jail.

"He's somebody who's essentially found guilty of shoplifting, somebody who went to a second (training) camp that was essentially benign," he said.

"He's somebody who's young, has no prior record, has a positive pre-sentence report," he said, adding that his client knows he made some "bad decisions in his life and allowed himself to be influenced."

Justice John Sproat of Ontario Superior Court found the accused guilty back in September.

But in his ruling, the judge found the convicted man to be genuinely remorseful, to have renounced violence and with plans to become a productive member of society, he said.

He said in his judgment at that time that there was overwhelming evidence that a homegrown Islamic militant cell did exist -- and that it had set its sights on Canadian targets.

In doing so, he rejected allegations by the defence that the whole matter was simply a collection of fantasies and brave talk.

The RCMP, working with the Canadian Security and Intelligence Service, made arrests in the summer of 2006. They also seized apparent bomb-making materials.

Police claimed the suspects planned to use three tonnes of ammonium nitrate to build truck bombs.

Some of the more stunning allegations included talk of storming Parliament, taking MPs hostage and beheading the prime minister.

A paid informant aided the investigation. In a late March ruling, Sproat rejected arguments that Mubin Shaikh had entrapped the young man.

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

During the trial, Shaikh had said the youth was unaware of the darker plans by the group's leaders, but Sproat rejected that testimony.

Of the 18 originally charged, only nine still face trial. Three other youths and four adults saw the charges against them stayed or withdrawn.

Another Toronto 18 defendant pleaded guilty in May.

With a report from CTV Toronto's Chris Eby and files from The Canadian Press