A nine-year-old girl conceived by donor insemination found herself at the centre of family court litigation after one of her two "mothers" set up home with a female-to-male transsexual.
The transsexual wanted a judge to rule that he could stay in touch with the girl following the acrimonious breakdown of his relationship with the girl's "non-biological mother".
But Judge Clifford Bellamy, who sits in Leicester, has blocked the bid - saying the girl might be damaged.
He suggested that the "exceptional circumstances" of the case showed that modern family life could be "complicated".
Detail has emerged in a written ruling by the judge.
He said no one involved could be identified.
The judge said the girl's biological mother was in a relationship with the non-biological mother when she was conceived with sperm from a donor.
He said the girl's biological father had been in a relationship with a man.
Judge Bellamy said the girl's two "mothers" separated when she was about three and she stayed with her non-biological mother after the split - not her biological mother.
The non-biological mother subsequently set up home with the transsexual, but that relationship ended more than two years ago and the transsexual had set up home with a man.
The transsexual has taken legal action to stay in the youngster's life but the judge refused his application for contact with the girl.
He said the girl already engaged with a "range of adults" and allowing the transsexual's application could have a "damaging effect" on her welfare.
"(The girl's) story is an example of the different ways in which modern family life is formed," said Judge Bellamy in his ruling. "Modern family life can be complicated."
Judge Bellamy said the girl's non-biological mother, biological mother and biological father were concerned about the transsexual having contact.
The judge said the girl continued to live with her non-biological mother, had regular contact with her biological mother - who had health problems - and spent time with her biological father.
He said she was aware of the litigation and the transsexual's application and had not expressed "any particular view". He said, if anything, she "appeared disinterested".