A provincial-court judge in Nova Scotia has banned a teen from using social-media websites after he pleaded guilty to multiple charges, including assault, uttering threats and criminal harassment.

The Sydney teen was also sentenced Thursday to six months of house arrest followed by 15 months of probation after pleading guilty to sexual assault, mischief and assault with a weapon for offences between September and April involving two victims.

He was 17 at the time of the offences and cannot be named under the Youth Criminal Justice Act.

Story continues below advertisement

As part of his sentence, Judge Jean Whalen ordered the teen to delete any Facebook, Instagram and Twitter accounts for 21 months.

He is also prohibited from accessing the sites under an alias, and must submit his passwords to a sentencing supervisor.

Crown attorney Steve Drake says it is the first time in the province that such an order has been issued and sets a precedent.