A Nova Scotia teenager who wants to sue the people she alleges bullied her on Facebook will be able to keep her name private, the Supreme Court of Canada has ruled. But the court has denied her request for a partial publication ban.

The case involved a teen known only as “A.B.” who learned in 2010 that a fake profile of her had been set up on Facebook.

The profile included a photo of the then- 15-year-old and a slightly modified version of her name. The fake profile discussed her physical appearance and allegedly included “scandalous sexual commentary of a private and intimate nature,” according to the court documents.

The teen wanted to launch a civil suit but also wanted a partial publication ban on the case, to keep the details of the alleged defamation under wraps.

On Thursday, the Supreme Court agreed that the teen’s identity should be kept confidential, saying the court had a duty to protect her.

“Recognition of the inherent vulnerability of children has consistent and deep roots in Canadian law and results in the protection of young people’s privacy rights based on age, not the sensitivity of the particular child,” the court ruled.

But the court added if the identity of the girl is sufficiently protected, there would be no need for a publication ban.

“If the non-identifying information is made public, there is no harmful impact on the girl since the information cannot be connected to her. The public’s right to open courts -- and press freedom -- therefore prevail with respect to the non-identifying Facebook content,” the court said.

A number of groups, including the British Columbia Civil Liberties Association and the Canadian Association of Journalists , had argued against a publication ban, saying the workings of the court system must be kept open to the public. They said keeping the proceedings under wraps deprived the public of the ability to understand how courts define defamation.

But anti-bullying advocates such as Kids Help Phone and the Canadian arm of UNICEF intervened in the case, saying the teen should not have to be subjected to further humiliation by having the details of the case spilled out in open court. They argued that doing so could dissuade others from going after their tormentors in court.

In Thursday’s ruling, the Supreme Court said it was satisfied that once A.B.’s identity were protected, there would be no need for a publication ban.