OTTAWA -- The CBC should not have been ordered to remove stories identifying a murdered Alberta girl from its online archives, the Supreme Court of Canada has ruled.

The high court made the 9-0 decision Friday in a case that touches on the issue of publishing in the digital era.

In early March 2016, the CBC published two articles that included the name and photo of a 14-year-old girl who was found slain in an apartment building in Edson, Alta.

When the accused made a court appearance days later, the judge issued a publication ban on any information that might identify the victim.

However, the CBC refused to take down the articles posted to its website before the ban and the Crown sought an order citing the broadcaster for criminal contempt as well as an interim injunction for removal of the stories.

A judge rejected the request for an injunction, but the province's Court of Appeal overturned that decision -- prompting the broadcaster to head to the Supreme Court.

In its decision, the high court agreed with the judge who initially weighed the Crown's request for an interim injunction. In reasons for the court's decision, Justice Russell Brown said the judge "applied the correct legal test" in deciding not to grant one.

The judge had cited three reasons in turning down the injunction application two years ago.

First, he found that the Crown was not likely to succeed in the criminal contempt matter by proving beyond a reasonable doubt that CBC was in "open and public defiance" of the publication ban by leaving the victim's name and photo on its website.

Second, he rejected the notion that leaving the identifying information on the CBC site would cause irreparable harm to the administration of justice by deterring others from seeking help. The judge noted that protection of a victim's anonymity is less of a concern when the person is dead.

Finally, the judge said that any harm to the administration of justice was outweighed by the compromise of CBC's freedom of expression, as well as the public's interest in that expression.

In a separate proceeding, the CBC was found not guilty of criminal contempt in May 2017 for refusing to remove the news stories. Justice Terry Clackson of the Alberta Court of Queen's Bench concluded that allowing access to the reports does not amount to publishing, transmission or broadcast.