An injunction banning the naming of a celebrity involved in an alleged extra-marital relationship should stay in place, the Supreme Court has ruled.

The celebrity, known in court as PJS, successfully appealed against a court ruling lifting the ban on media in England and Wales publishing his name.

The Sun on Sunday argued it should be able to run the story as his name had already been published elsewhere.

The man had taken legal action saying that he had a right to privacy.

He has young children with YMA - as his spouse is known in court documents - and both are described as "well-known individuals in the entertainment business".

What is the future for privacy injunctions?

Why didn't the order apply in Scotland?

Legal proceedings had started earlier this year when the Sunday tabloid wanted to publish a story about the celebrity, alleging he had taken part in what the courts described as a "three-way sexual encounter".

The man sued News Group Newspapers claiming that publication of information about the alleged extra-marital activity would be a misuse of private information and a breach of confidence.

He asked the Supreme Court to consider the issue after losing his case in the Court of Appeal last month, when three appeal court judges ruled the injunction should not remain in place.

The Supreme Court has now restored the injunction by a majority of four to one. It will stand until trial or a further order.

Analysis

By David Sillito, BBC media correspondent

It's a balancing act - the right to privacy versus freedom of expression.

The Sun on Sunday says the story is effectively out because it's been published in America, Canada and Scotland.

The Supreme Court disagrees saying that there would be additional "intensive coverage" if the injunction was lifted.

The four to one decision says just because the couple are well known, there is no "right to invade privacy". They are also concerned to protect the interests of the couple's children.

However, one of the four judges, Lord Toulson, disagrees with the judgment saying that while the publication of the story would involved "acute unpleasantness", the story is not going to go away "injunction or no injunction".

He adds that the children are young and could be shielded from the immediate publicity.

In the judgement, four of the five justices decided there was an "absence on present evidence" of any "genuine public interest" to justify publishing the man's identity.

They said the injunction, pending the outcome of any trial that could take place on the issue, was appropriate as it would protect PJS and his family against "further invasion of privacy".

Lord Mance said the Court of Appeal went wrong in the balancing the rights of freedom of expression against the rights of privacy when it agreed with an application to discharge the injunction brought by News Group Newspapers, publishers of the Sun on Sunday.

He said there was "no public interest (however much it may be of interest to some members of the public) in publishing kiss-and-tell stories or criticisms of private sexual conduct, simply because the persons involved are well-known".

He noted the case "will probably give rise to further, entirely legitimate debate on the value of such injunctions in the internet age".

Lord Mance added the Supreme Court had come to the conclusion it was "likely" that a permanent injunction would be granted "on a trial in the light of the present evidence", meaning it was appropriate to have an interim injunction in place.

'Important moment'

Lawyers have said the Supreme Court decision could have a significant effect on future cases.

David Engel, media lawyer and partner at Addleshaw Goddard, said: "The Supreme Court has put clear blue water between the law of confidentiality and the law of privacy.

"That's not just a technical distinction. It has engaged with the realities of how information is published and consumed online and in social media.

"It has made the practical point that even where people may be able to find the information online, that is qualitatively different - in terms of the distress and damage caused to the victim - from having the story plastered across the front pages of the tabloids."

Kate Macmillan, partner in the media and privacy team at Collyer Bristow, said: "This case has raised quasi-constitutional issues and the outcome is likely to have far-reaching consequences.

"Those who value privacy will be pleased that that the Supreme Court has stepped in to make clear that the nature of the modern tort of privacy is to protect against intrusion and harassment, as well as to preserve secrecy when appropriate to do so."

Legal specialist Robin Shaw, who specialises in media-related litigation, said the decision could lead to a "rapid increase" in applications for injunctions.

He said the case of footballer Ryan Giggs - who was named on Twitter and then identified in Parliament as having an injunction in place over an alleged affair - was thought to have meant the end of celebrity injunctions because coverage on social media and abroad "showed the difficulty, if not impossibility, of keeping anything secret in the digital age".

"In consequence, applications to the court for privacy injunctions have virtually disappeared, but PJS's success in obtaining an injunction and maintaining it - despite the enormous attention given to it on social media and abroad - will still protect the celebrity from widespread adverse coverage in the mainstream media such as newspaper, television and radio," he said.

Former Lib Dem MP John Hemming, who used parliamentary privilege to name Giggs five years ago, said he was surprised by the ruling.

"The logical conclusion of this is that gossip about anyone with children will become a criminal offence subject to a potential penalty of two years' imprisonment," he said.