Child pornography charges have been stayed against a Fort Saskatchewan teenager because a government agency inadvertently made his name public.

Provincial court judge Patricia Kvill called the news release issued by the Alberta Law Enforcement Response Team in November 2018 "careless" and "sensational."

She said the teen's constitutional rights were breached when ALERT violated the Youth Criminal Justice Act.

"There is prejudice to a particular young person where there has been a release of information naming that youth," Kvill said in her written decision. "But there is prejudice to the whole youth justice system when the state is responsible for the release of this information."

The teenager is identified by his initials B.M. in Kvill's written decision.

In January 2018, the teen pretended to be a woman from a modelling agency. Using a fake email address, he contacted the mother of a model, asking for nude photos of her daughter's chest. The model was a 17-year old girl he went to school with. She's identified in the written decision by the initials M.D.

Using his phony persona, B.M. said the nude photos were needed to be considered for a La Senza photo shoot.

M.D.'s mother eventually forwarded three nude photos of her daughter's chest.

Teen was 17 when charged

The mother later became suspicious and discovered no one by that name worked at the modelling agency, so she contacted the police.

Their investigation led them to B.M. Police executed a search warrant and found the fake email account and the nude photos, which had not been shared with anyone.

B.M. was 17 when he was charged in August 2018 with possession of child pornography and making an arrangement with M.D.'s mother to commit an offence.

He turned 18 the next month.

Two months after that, ALERT issued its news release, citing his full name, age and hometown.

The title of the news release was, "13 Suspects Arrested for Child Luring" and boasted about an eight-month project targeting suspects who were allegedly trying to arrange for sex with children.

According to the written decision, B.M. found out about the release while he was at school. He called his mother, begging to be picked up.

"He stated on that day he wanted to end his life, he believed he would be hated by everyone and he wouldn't be able to even walk outside his door," the decision said.

His lawyer, Danielle Boisvert, told CBC News she was in court that day when his client's mother called in a panic.

Youth shunned by relatives

Boisvert looked online and found her client's name posted on the internet. She called television stations, begging them not to air the story with her client's name and said Edmonton outlets complied.

But the story had already aired in Eastern Canada. B.M. has extended family in Newfoundland who saw the news.

"Following their hearing of this news, B.M.'s entire extended Newfoundland family, with the exception of one aunt, have shunned B.M. and indicating that they no longer wish to have any contact with him," the judge wrote.

Boisvert became emotional when asked about the impact the publication of his name has had on B.M.

"There were a number of times when me and my staff had to bring that family back from the brink," Boisvert said. "I don't think I've had many other cases that have been as close to the heart."

The judge noted B.M. was alienated and ostracized by friends and fellow students after the news release was issued.

He has sought counselling but fears for his safety.

- Judge Patricia Kvill

"He believes he is unable to obtain employment as a result of the publication of his name," the judge said. "He fears that news of these charges will hinder his chances of university acceptance. He has become isolated. He has sought counselling but fears for his safety."

Once ALERT realized its mistake, it removed B.M.'s name from the news release and asked media outlets to do the same. But the damage had already been done. To this day, his name still appears online.

"It is virtually impossible to stuff the genie back into the bottle once information has been published on the internet," the judge noted.

In June, 2019, B.M. pleaded guilty to two criminal charges.

But his lawyer argued the charges should be stayed because his rights had been violated.

The judge agreed and included a scathing rebuke of ALERT's actions

"One would have thought that great care would be taken by ALERT to ensure that misleading information about a suspect is not contained in their media notices, particularly when the notice deals with reviled sex crimes against children," Kvill wrote.

"When the agency of the government breaks a law intended to protect young offenders, the result shakes the foundation of the Youth Criminal Justice Act."

Supt. Chad Coles, the officer in charge of ALERT, responded with an email to CBC News.

"In November 2018, ALERT inadvertently released the name of young offender. Since that time, ALERT has instituted a number of administrative processes to further prevent a similar situation from happening again."