The case raises highly unusual legal issues concerning whether a court should stop publication when an individual claims that a media investigation would lead to them inflicting harm on themselves.

The celebrity first asked the court in the summer to stop the publication of the investigation after journalists contacted him with allegations about this sexual activities with a large number of young women.

ITN and the Guardian said their investigation had uncovered how the celebrity had allegedly abused his “power and status”.

During last week’s application for a permanent injunction, Mansoori said making the allegations public would have a “potentially fatal impact”.

The barrister told the court that the man had tried to kill himself after he had been contacted by the media organisations and was later detained in hospital for his own protection – but later absconded and tried a second time to end his life.

Those incidents of self-harm had not been because of the allegations themselves but the result of “long-term trauma and the fear of trial by media”, she argued.

“The only reason [suicide attempts] would not be fatal is because the claimant would be locked up and prevented from his desire to end his life,” she said.

Lawyers for the media groups argued that there was a strong public interest in allowing their investigation to be publicised because of the serious nature of the allegations.

In his judgment, Nicklin wrote: “The proposed publications concern serious allegations about the conduct of a prominent person and the alleged use of status, influence and access in dealings with women and girls.

“The subject matter includes alleged abuse of power, sexual misconduct and inappropriate conduct towards younger or vulnerable persons.

“Those are matters capable of making a significant contribution to public debate.”

The celebrity argued that publishing the allegations would breach his protections under the European Convention on Human Rights, including articles that guarantee the right to life and protection from inhuman or degrading treatment.

However, the judge rejected the claim that publication would violate the man’s right to life, writing: “No prior case establishes that the Court’s knowledge of a suicide risk, together with its power to prohibit the event expected to increase that risk, is by itself enough to require the Court to act.”

The judge accepted that publishing would cause the man “acute and potentially prolonged mental suffering” – but said “established law did not impose a positive obligation upon the Court to prevent that suffering by restraining publication”.

The man also cited the right to private and family life.

While the judge acknowledged that publication “would interfere exceptionally seriously with the Claimant’s private and family life”, he also rejected that claim, saying a permanent injunction “would have been an exceptionally serious restriction upon freedom of expression”.

The BBC Action Line website has information about organisations that can offer support for the issues raised in this story.