TORONTO -- A 24-year-old man has pleaded guilty to a terrorism-related charge in a Toronto court.

The Public Prosecution Service of Canada says Kevin Omar Mohamed pleaded guilty Friday to one count of participating in or contributing to, directly or indirectly, 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.

The prosecution service did not provide details of the case but said the maximum penalty is 10 years imprisonment.

Mohamed has been in custody since he was charged in March 2016 and officials say he'll be sentenced at a later date.

Mohamed was originally charged with carrying a concealed weapon and possession of a weapon dangerous to public peace.

His lawyer, Anser Farooq, said at the time that the weapon was a knife that police alleged was illegal.