Mohamed Hersi, the first man ever convicted in Canada of trying to join a terrorist group, was sentenced by Justice Deena Baltman to 10 years in prison.

This was the full sentence the Crown asked for in the precedent-setting case. 

"Anything less trivializes the nature of his actions," said the judge about the sentence from the Peel Region court in Brampton, Ont.

Hersi was convicted of attempting to participate in terrorist activity abroad and trying to enlist an undercover officer. The Crown argued he was trying to join the Somali militant group al-Shabaab, which Canada deems a terrorist entity.

The 28-year-old, who was working as a security guard, intended to travel onward to Somalia to join al-Shabaab, the Crown said. 

Mohamed Hersi outside court

Mohamed Hersi is the first person in Canada to be tried and convicted under Criminal Code Section 83.18, a new part of the law that was legislated in the wake of the Sept. 11, 2001, hijackings. (CBC)

He was bound for Cairo when he was arrested at Toronto's Pearson International Airport in 2011.

Hersi never officially joined the group and denied the allegations, saying he was going overseas to study Arabic for several months.

Hersi is the first person convicted in Canada for offences related to Criminal Code's Section 83.18, which makes it illegal to "knowingly participate" or "knowingly contribute" to "any activity of a terrorist group for the purpose of enhancing the ability of any terrorist group to facilitate or carry out a terrorist activity."

Hersi will be eligible for parole only after half of his sentence is served.

With Files From Lucy Lopez