A Saskatchewan man who lost a high-profile child custody dispute has died in a car accident.

The Saskatoon man, who did not know he was a father until shortly before his son was born, sought custody of the boy after he was given to a couple by the mother.

The case was heard in December, but Court of Queen's Bench Justice Shawn Smith ruled last January that the boy should remain with his custodial parents in Prince Albert, Sask.

Mark Vanstone, the man's lawyer, said his death ends an appeal of the ruling.

The name of the father cannot be released because of a publication ban.

RCMP say the man died Saturday in a crash near the Dundurn military base south of Saskatoon. He was driving a car that was hit head-on by a truck pulling a trailer on the wrong side of the highway.

During the custody battle, court heard that the father was involved in a casual sexual relationship with the baby's mother, but she didn't tell him she was pregnant until shortly before the child was born. A DNA test confirmed paternity.

But the biological mother had already arranged for the Prince Albert couple, whom her family had known for 14 years, to take the child.

The biological father said he wanted to raise the boy. But the couple's lawyer pointed out that the biological parents suffered from alcoholism, failed relationships and unlawful conduct. The man had also fathered children in other relationships.

In his ruling, Smith said the father could be a positive influence in the boy's life, but not in a parental role. He barred the father from seeing his son for one year in order to give the couple time to bond with the child.