Image caption The Court of Appeal overruled a previous High Court decision

A well-known sportsman, who obtained an injunction preventing the media publishing details of his private life, has won a court appeal against a ruling which would have revealed his identity.

Judge Lord Neuberger ruled in favour of the man, known only as JIH.

He said JIH had been in a long-term relationship with someone referred to in court as XX.

He wanted to block a story claiming he had a sexual encounter with someone known by the alias ZZ.

The Court of Appeal heard that when JIH discovered that News Group Newspapers intended to publish a story based on information provided by ZZ, he began legal proceedings - without revealing his identity - in order to stop them.

Analysis Today's decision is the latest in a line of cases in which celebrities have sought injunctions to prevent details of their private lives being published. The courts have to balance the celebrity's right to privacy against the press' right to freedom of expression. Privacy can be protected a) by preserving the celebrity's anonymity and b) by preventing publication of the facts of the case. The Court of Appeal affirmed the critical importance of open justice. Any applications for injunctions involving anonymity and preventing publication must be carefully scrutinised. The press' Article 10 -right to freedom of expression -should only be interfered with to the extent that it is absolutely necessary. In deciding some of the facts of the private life of JIH can be revealed, the court is indicating the public should know what these cases are about, even if they don't learn who they are about.

When the matter reached the High Court, Mr Justice Tugendhat agreed to an injunction regarding the private information, but refused to continue an order granting the sportsman anonymity.

JIH appealed against that decision and his lawyer, Hugh Tomlinson QC, argued that by revealing that a named individual had won a secrecy order about his private life there would inevitably be great speculation about the details concerned - and in all likelihood, those details would eventually become public.

"The effect of the judge's order would be to put this claimant's life into the media spotlight - a huge intrusion into his private life," he said.

Overruling Mr Justice Tugendhat, Lord Neuberger said "the whole purpose of the injunction would be undermined" if JIH's name was revealed.

He added: "If we permitted JIH's identity to be revealed without permitting the nature of the information of which he is seeking to restrain to be published, then it would nonetheless be relatively easy for the media and members of the public to deduce the nature of that information; it would be a classic, if not very difficult, jigsaw exercise."