Three of the minors accused in a horrifying sexual assault case against a 13-year-old girl will be allowed to return to the same school as the alleged victim pending trial.

The accused, along with another minor, are facing charges of sexual assault, sexual assault with a weapon, unlawful confinement, and production and distribution of child pornography, because the victim was minor.

The accusations come after a girl is alleged to have been sexually assaulted last month during a house party in Montreal North. The assault was filmed and circulated on social media.

A judge used a clause in the youth court system Wednesday to release the three accused into the care of their parents, who become responsible for their actions if they don't respect their conditions.

They are under a 24-hour curfew, except to attend school and are forbidden from using the internet.

The fourth accused will be charged Thursday.

The ruling means the accused will be back in school where their alleged victim also attends. The prosecution and the defence claim measures have been taken to ensure the accused don't interact with each other, let alone with the traumatized victim.

Because those involved are minors, CTV cannot name the school or anyone else involved to protect their identity.

At the bail hearing Wednesday, the prosecution was determined to make sure the three would not get bail, considering the accusations are extremely serious.

Three boys are alleged to have assaulted the girl while another girl the same age was filming.

The video circulated briefly on social media before it was taken down. It was there long enough, however, for the victim's brother to see it and tell their father, who reporting it to police.