It is now being decided if the case can go the the UK Supreme Court
An injunction barring the naming of a celebrity who engaged in "extramarital activities" can be lifted, UK judges have said.
Editors of the Sun on Sunday wanted to publish an account of the man's "sexual exploits" with others.
The man took legal action and earlier this year two British Court of Appeal judges imposed an injunction preventing the newspaper from identifying the man.
Three appeal court judges have now said the injunction can be lifted following a challenge by lawyers for the newspaper.
But they did not name the man in their ruling pending further legal action by his lawyers.
Lawyers for the celebrity - referred to as PJS - are asking appeal judges to give them permission to take the case to the British Supreme Court.
And the appeal judges said the celebrity cannot be identified until they have ruled on whether the case should go to the highest court in the UK.
Justice Jackson announced the decision and said: "No one must publish anything which is covered by the present injunction until this court has heard, and adjudicated, upon the claimant's application for a stay pending appeal".
Sun on Sunday editors argued that the ban should go because the man - a show business celebrity and public figure - has been named in articles abroad and his identity could be found on the internet.
The man opposed the application and said the ban should stay in place.
Justice Jackson said appeal judges had concluded that "knowledge of relevant matters" was "now so widespread" that confidentiality had "probably been lost".
"Much of the harm which the injunction was intended to prevent has already occurred," he said.
"The court should not make orders which are ineffective".