Three Ottawa men who conspired to commit terrorism have pleaded guilty and have been sentenced in Ontario Superior Court, with the alleged ringleader, Ashton Larmond, facing the stiffest penalty.

Twins Ashton and Carlos Larmond conspired over a five-month period from Aug. 1, 2014 to Jan. 9, 2015, in both Ottawa and Gatineau, Que.

Suliman Mohamed was arrested just days after the twins, and conspired to participate in terrorist activity with them.

Ashton Larmond initially faced three charges, including facilitating terrorist activity, participating in the activity of a terrorist group, and instructing to carry out activity for a terrorist group.

He pleaded guilty Friday to the latter charge and was sentenced to 17 years in prison, minus 894 days for time already served. He also pleaded guilty to making death threats in jail and received 12-month sentences for each offence, to be served concurrently.

In court, Crown prosecutor Douglas Curliss said it was Ashton Larmond who directed plans to join the Islamic State of Iraq and Syria in Syria or kill people in Canada.

Suliman Mohamed Terrorism Suspect

Ottawa's Suliman Mohamed was arrested just days after the twins. (Laurie Foster-MacLeod)

Ashton the 'organizer and director'

Curliss called Ashton "more of an organizer and director" in the planning of terrorist activities.

His brother, Carlos Larmond, was initially charged with participating in the activity of a terrorist group and attempting to leave Canada to participate in terrorist activity abroad.

He pleaded guilty to the latter charge and was sentenced to seven years in prison minus 894 days for time already served. He was also sentenced to another six months for making death threats in jail, to be served consecutively.

Carlos Larmond's defence lawyer told the courtroom Friday that his client "doesn't even recognize himself during that period and can't believe he was willing to do that." The lawyer characterized him as a "naive young man" who was "in flux" when he connected to Islamic extremism.

Suliman Mohamed was originally charged with participating in the activity of a terrorist group and conspiracy to participate in a terrorist activity.

Mohamed pleaded guilty to the latter charge and was sentenced to seven years in prison minus 889 days of credit for time already served.

All three co-accused will not be eligible for parole until half of their sentences have been served.