BRAMPTON, Ont. - The ringleader of the so-called Toronto 18, who told recruits the group would storm Parliament and "cut off some heads," has been sentenced to 16 years in prison, but could be released in less than four years.

Court heard weeks of evidence that Fahim Ahmad, 26, plotted to attack Parliament buildings, electrical grids and nuclear stations, and that he held training camps to assess recruits for his cause.

At one point, an undercover police officer in a surveillance van intercepted Ahmad suggesting going to Parliament to "cut off some heads" and "kill everybody.''

Ahmad has a credit of 8 1/2 years for time served and is eligible for parole in 3 1/2 years.

The Crown had suggested 18 years to life in prison, while the defence was asking for about 12 years.

Ahmad had pleaded guilty mid-trial to participating in a terrorist group, importing firearms and instructing his co-accused to carry out an activity for a terrorist group.

Ahmad, who wore a striped lime green golf shirt and blue jeans, was emotionless as the judge read his decision, but later turned around to smile at supporters gathered in the courtroom.

During his trial, court heard Ahmad was the leader of a terror cell and held two training camps in the Ontario wilderness to assess his recruits' suitability to help him in his plot.

At the camp, he gave a fiery speech where he urged the men to band together to do whatever it took to defeat the empire of Rome, meaning Western civilization.

Police informant Mubin Shaikh, who attended the camp and even gave firearms training to the recruits, said video showing his training includes jihad-themed music that says "kill the infidel.''

Ahmad also told camp participants that they share the beliefs of al-Qaida, Shaikh said. Though their group was not officially connected to al-Qaida, "we're down with them,'' Shaikh quoted Ahmad as saying.

Ontario Superior Court Justice Fletcher Dawson said he took into account Ahmad's young age at the time of his arrest, the fact that he has no previous criminal record and evidence of his remorse when deciding his sentence.

He also considered letters written by Ahmad and his wife. In his letter, Ahmad wrote that he had an isolated upbringing and that his wife has been left to raise their two young children alone. He wrote that he has interacted with people of other religions while in jail and has since grown tolerant and has seen the error in his ways.

"I am not dealing with someone who remains openly defiant," Dawson said.

"Perhaps I'm only optimistic, but I see prospects of rehabilitation."

The judge said he took into account that Ahmad "was not really effective in pursuing his despicable goals," and portrayed Ahmad as a man who talked the talk, but couldn't walk the walk.

The judge said Ahmad was motivated by "bias, prejudice" and hate, and was a "pathetic figure who grossly exaggerated to achieve status and attention," but added that history has shown even amateur terrorists can succeed in their goals.

"He intended to commit indiscriminate mass murder" for religious purposes, Dawson said.

He noted that although Ahmad's plot didn't get far, he managed to persuade others, luring other young men into his scheme.

"(Ahmad) must bear considerable responsibility for embroiling those young men in his pursuits...(and) virtually ruining the lives of a number of other young men," said Dawson.

He also considered that Ahmad pleaded guilty 13 days into his trial, and only after the Crown presented an "overwhelming" case against him that included the testimony of Shaikh.

The judge told Ahmad that he sincerely hoped he would demonstrate in the future that he has changed his extreme views.

"Show me that I wasn't wrong in my assessment," he said.

Outside court, Crown lawyer Croft Michaelson said he was pleased with the sentence.

"Overall, we're very happy with the result today," he said. "We've sent out a strong signal to the community that these type of offences will not be tolerated in Canada, and it reflects the seriousness of the crime."

Ahmad is among the last of the "Toronto 18" to be sentenced. Two more people will be sentenced in November, the Crown said. Ahmad's sentence is the second longest among those sent to prison.

Zakaria Amara was sentenced earlier this year to life in prison with no chance of parole until 2016. He and Ahmad had a falling out and Amara formed a separate group, which managed to get further along in its plans to bomb the Toronto Stock Exchange, CSIS offices in Toronto and an eastern Ontario military base.

Of the 18 people charged, seven had their charges dropped or stayed, four were found guilty and seven pleaded guilty.