An Australian sperm donor is the father of an 11-year-old girl because it was understood he would be involved in her life, the nation's top court has ruled.
The man had fought to stop the girl's biological mother and her wife from moving to New Zealand with the child.
It overturns a lower court's ruling that the man did not have such rights.
Experts say the case has significant implications because it widens the legal scope for who can be considered a parent in Australia.
The man's lawyer, Tahlia Bleier, said her client was elated after a five-year battle for recognition.
The ruling was also meaningful for "every father out there that has decided to raise a child with a friend as opposed to a romantic partner", she told the BBC.
What was the dispute?
The 49-year-old man and the child's mother, who was single at the time, had been friends when he agreed to donate his semen in 2006.
They arranged to raise the child together but the pair later had a falling out, his lawyers said. The woman's lawyers argued he was not the father.
However, the man was identified as a parent on the girl's birth certificate and she called him "Daddy".
On Wednesday, the High Court of Australia ruled that he had the legal status of a parent, effectively preventing the family from moving to New Zealand.
The judgement said: "To characterise the biological father of a child as a 'sperm donor' suggests that the man in question has relevantly done no more than provide his semen to facilitate an artificial conception procedure on the basis of an express or implied understanding that he is thereafter to have nothing to do with any child born as a result of the procedure.
"Those are not the facts of this case."
The parties were not identified in court for legal reasons.
Why is the ruling significant?
It makes clear legally that a man who has donated sperm to a single woman and has a role in the child's life may be a parent, said family law professor Fiona Kelly of La Trobe University.
But Prof Kelly said the decision did not address the level of involvement required, and as such it "opens the door for other scenarios".
"A lot of known donors are involved in children's lives to varying degrees, but they would not say they were the legal parents of the child - so this raises some alarm bells for donors," Prof Kelly told the BBC.
"The ruling resolves it for this particular family - but they are the exception rather than the rule. It is rare that a donor has his name on the birth certificate."
The case would prompt further questions in an area of intense legal uncertainty, agreed Prof Belinda Fehlberg of the University of Melbourne.
"There will be many families who will be looking very carefully at the reasoning of the High Court," she said.