A first-degree murder charge against the 18-year-old accused in the stabbing death of Hamilton high school student Devan Selvey has been withdrawn, and he's instead facing assault charges.

The 18-year-old, who cannot be identified under a court-ordered publication ban, appeared at the John Sopinka Courthouse in Hamilton on Friday morning for a bail hearing.

The Crown withdrew the murder count. He's now charged with assault with a weapon, administering a noxious substance and unauthorized possession of a weapon.

Outside of court, the 18-year-old embraced more than a dozen family members and supporters, who filled three benches in the courtroom during the hearing.

"He's spending time with his family now," defence lawyer Jordana Goldlist said after her client was released from custody.

"He's been improperly in custody for two months, shuffled between three different institutions. He spent a significant amount of time in segregation, so right now he's just looking forward to going home with his family as he should be."

She said the Crown had to withdraw the murder charge, because "there was no reasonable prospect of conviction."

The 18-year-old was released to two sureties — one of whom will have to pay $20,000 if he doesn't comply with conditions and the other who will have to pay $5,000.

His conditions include not being within 100 metres of Sir Winston Churchill Secondary School or the Pat Quinn Arena, observing a curfew between 10 p.m. ET and 6:30 a.m. ET and not having contact with a list of 63 people or anyone with a criminal record. He also cannot possess any weapons.

The 18-year-old and his 14-year-old brother, who can't be named under the Youth Criminal Justice Act, were initially both charged with murder in the Oct. 7 stabbing of Devan, 14, outside Winston Churchill Secondary School.

CBC News previously spoke with witnesses who said that bear spray had been used on a crowd of people standing in front of the arena, causing them to scatter right before the stabbing, which happened behind the school.

Police allege the 14-year-old is the person who stabbed Devan, so he's still charged with first-degree murder.

Death started conversation around bullying

Devan died in the arms of his mother, Shari-Anne Selvey.

Selvey was briefly spotted outside court Friday but appeared upset and did not speak with reporters.

Devan's death kickstarted a community conversation about bullying and led to the Hamilton-Wentworth District School Board setting up a panel to examine its anti-bullying practices.

Ontario Education Minister Stephen Lecce also pointed to what happened to Devan as one of the driving factors behind the changes the provincial government introduced last month to tackle bullying.