MONTREAL -- A Montreal teen convicted on two terrorism-related charges for attempting to join up with Islamic State militants was handed a three-year sentence Wednesday.

The boy, now 16, was found guilty in December on two charges: committing a robbery in association with a terror organization and planning to leave Canada to participate in the activities of a terrorist group abroad.

Despite some reservations, youth court Judge Dominique Wilhelmy agreed to a joint recommendation of two years of supervision, with 16 months in a detention centre and another eight served in the community.

The final year would be 12 months probation with stringent conditions: refraining from social media activity; consulting an imam or theologian on a regular basis; undergoing a psychological follow-up; staying in Canada; and avoiding people who have terror links.

Three years is the stiffest sentence that can be doled out under the Youth Criminal Justice Act.

"Despite the worry and the questions that exist ... I will sign off on the common suggestion," Wilhelmy told the boy.

The case stems from an October 2014 convenience store robbery by the teen, then 15, who had hatched a plan to go to Syria to help ISIL.

His father found out about the robbery and turned him in. Subsequently, terrorism charges were laid and the boy has since served a sentence for the hold-up.

Wilhelmy said the recommendation by the Crown and defence was based on reports on the boy's considerable progress.

Five experts, working independently, came up with largely similar views about his chances of reforming.

The defence argued at trial the teen was confused and just wanted to help fellow Muslims.

The Crown argued he was radicalized, as shown in Twitter conversations with jihadist sympathizer Martin Couture-Rouleau and in the accused's references to the convenience store loot as "war booty" when he spoke to police investigators.

Wilhelmy noted one expert said the risk of recidivism couldn't be evaluated and another suggested the length of the deradicalization process would be equivalent to the time it took to radicalize him in the first place.

The court heard the teen has reconciled with his family and that his rigid views on Islam and radical views have changed thanks to the help of an unnamed imam.

His father told the court his son has changed considerably but is not yet 100 per cent reformed.

Wilhelmy praised the boy's parents for intervening and likely saving his life.

"We cannot predict the future, I wish you good luck," she told the teen. "I hope your decision to modify your perception of things, of life and society will hold."

The boy's lawyer, Tiago Murias, said his client shows "enormous potential" academically and wants to pursue studies in mathematics.

Murias still believes the accused fell prey to radical propaganda.

"You cannot say that a young man of 15 years old, who is subject to heinous propaganda, isn't a victim at some point," he said.

The case is described by prosecutors as the first involving someone charged under a 2013 law that made it illegal to leave or attempt to leave the country to participate in terrorism-related activities.

As such, prosecutor Lyne Decarie told the court there was little jurisprudence to work with.