A man is suing his unfaithful estranged wife after discovering her eight-year-old son is not his.
The unnamed man wants the mother to return "every penny" he spent on the child he thought was his but was fathered by someone she had an affair with.
He also wants damages to compensate for 'distress'.
A High Court judge has decided the mother must tell her husband and son the name of the man she says is the father.
But Mr Justice Cohen has ordered the man not to publicise the real father's name, adding the boy must not be told 'until the time was right'.
The judge said a social worker would give advice and decide when the child should be given the information.
His decision has been outlined in a written ruling following the latest round of litigation at private hearings in the Family Division of the High Court in London.
The judge ruled no-one involved could be named in media reports of the case.
The former couple had argued over whether the boy should be told who his real father was.
The man said he should be told while the boy's mother was against it.
Detail of the case had emerged in July when the judge published an earlier ruling.
The judge said the man had been devastated to learn that he was not the boy's father and had launched a "raft" of litigation.
The judge will consider whether the man's claims relating to deceit should be allowed to proceed at a hearing in October.
Mr Justice Cohen is then due to oversee a trial relating to how money should be divided, following the breakdown of the couple's marriage in January.