A Northern Ireland classroom assistant has won a landmark High Court injunction over claims her ex-partner threatened to post a video of them having sex on Facebook.

She was granted a temporary order after a judge heard allegations that he also threatened to show footage to her school bosses and pupils.

The case, believed to be the first of its kind in Northern Ireland, was extended to cover the social networking giant.

It prohibits the defendant from showing, publishing or distributing the video or uploading it to any website.

A judge in Belfast granted the legal protection after hearing the woman's reputation and job were at risk from the alleged threat.

Her lawyers claimed any clips could spread uncontrollably if they were allowed to be uploaded.

Barrister Peter Girvan said: "If the defendant placed this video on Facebook now it would probably take time for the administrators to pick up on it.

"Within that timeframe all the material could go viral."

The woman, who can't be identified, was in a long-term relationship with the man she alleges is threatening her.

Despite breaking up last year, they had sex again last month after meeting when she was drunk, the court heard.

Five days later she discovered that he claimed to have recorded a 17-minute clip of this on his phone, according to her account.

She alleged that he showed it to her sister's boyfriend and planned to disclose it to her employers.

It was claimed that he also threatened to sit outside the school where she worked and send footage to pupils via bluetooth.

The man further issued a threat to put clips on Facebook, she alleged. During an ex parte injunction application, at which the defendant was not represented, Mr Girvan stressed that his client had not consented to the sexual encounter being filmed.

The barrister, instructed by Hilary Carmichael Solicitors, told the court the allegations were referred to the PSNI, but said they had limited powers to intervene.

Although there was no suggestion of Facebook doing anything wrong, Mr Girvan pointed out that its policy was to stop any such material appearing on its site.

Granting the interim injunction, Mr Justice McLaughlin made clear that he was making no decision on the truth of the allegations.

He said: "If they turned out to be true ... if the threats made were carried out it would cause grievous damage to the reputation of the plaintiff and it might well put her job at risk.

"It would be potentially damaging to young children, children of a primary school age."

And he added: "It would potentially result in a significant invasion of her rights to family life and would certainly prejudice her private life."

The judge also agreed to join Facebook to the injunction on the basis that it is in line with its policies.