BRAMPTON, Ont. - A man who pleaded guilty in a homegrown terrorist plot to wreak havoc against Canadian targets was handed a 14-year prison sentence Thursday for what the judge called a "vile" crime.

Saad Khalid, 23, was not the leader of the so-called Toronto 18 but his degree of responsibility "remains fairly high," Ontario Superior Court Justice Bruce Durno said in passing sentence.

"This was not a spur of the moment offence," Durno said. "Canadian society relies on ballots and not bullets or bombs to change policies."

Khalid pleaded guilty in May to one count of participating in a terror plot with the intention of causing an explosion.

He had told the court that he accepted responsibility for his role in the plot to detonate bombs outside the Toronto Stock Exchange and CSIS headquarters, as well as an unnamed Ontario military base in 2006.

On Thursday, Durno said he accepts that Khalid is truly remorseful but added terrorist offences are "the most vile form of criminal conduct."

"They attack the very fabric of Canada's democratic ideals... Their object being to strike fear and terror into the citizens in a way not seen in other criminal offences."

The judge granted Khalid seven years credit for time already served and said parole eligibility would be left in the hands of the parole board.

Khalid, dressed in baggy jeans, a blazer and a button-up shirt, leaned forward and appeared to listen intently during the sentencing hearing. After the sentence was handed down he gave family members a wave and a small smile.

Outside the court, defence lawyer Russell Silverstein said his client was "perfectly happy" with the sentence and will not appeal.

"It could have been worse," said Silverstein, who added Khalid could apply for parole in two and a third years.

"To be even a bit player in a significant and serious offence is still a significant and serious infraction."

The defence had asked that Khalid be sentenced to 10 years and spend two more years behind bars.

The Crown called for an 18-to 20-year sentence, with five to five-and-a-half years credit for time already served.

"The Public Prosecution Service of Canada, on behalf of the federal Crown, will examine the sentence in the days to come," said Brian Saunders, Canada's director of public prosecutions.

"It's important to note that nine persons remain accused and that prosecutions are ongoing in this matter."

In the summer of 2006, an intense investigation involving Canada's spy agency and the RCMP ended with the arrests of 18 people in the Toronto area and the seizure of apparent bomb-making materials.

Khalid was arrested while unloading what he and his fellow alleged conspirators believed was at least two tonnes of ammonium nitrate.

The case took a stunning turn when allegations surfaced that the ringleaders had talked about plans to storm Parliament, take MPs hostage and behead the prime minister.

Seven of the 18 people arrested have since had their charges dropped.

A youth member of the group was sentenced in May to two-and-a-half years after a judge found him guilty of helping and taking part in a terrorist organization, but with time already served factored in he was allowed to walk free.

The others have yet to stand trial.

In his address to the court in May, Khalid said he "was not motivated by a hate for Canada, Canadians, democracy, or Canadian values of freedom, civil liberties, and women's rights."

"I realize that this does not justify my actions in any way. But it is important to have my motive known so people understand that I am not a lunatic who is hell-bent on the destruction of Western Civilization," he had told the court.

Khalid has been in custody for more than three years.

The young man's mother died when he was a teenager and in high school he became increasingly religious and developed a need to belong to a group, Durno noted. He had a desire to change Canadian foreign policy, particularly relating to Afghanistan, and now realizes there are better, non-violent ways to affect change, Durno said, citing a psychiatrist's report.

While in custody Khalid has been taking courses and meeting with spiritual advisers and truly appears to have learned "a significant lesson," Durno said.

"He is not just mouthing the right words," he said. "The offender can be rehabilitated and become a law abiding member of society."