Actor Jason Patric scored a victory in court and established a legal precedent this past Wednesday, when he was granted the right to claim paternity of his four-year-old son Gus, conceived through artificial insemination. The custody dispute between Patric and his former girlfriend Danielle Schreiber dragged on for months and attracted nationwide press attention. Patric was unsuccessful in the original dispute, when a a Los Angeles Superior Court judge denied The Lost Boys star access to the child. According to California law, in these cases, the mother is given full custody, unless there is a written agreement establishing parental rights before conception.

Jason Patric
Patric won on his second try for custody.

This decision was overturned, however, when Patric appealed. Accortding to The Hollywood Reporter California appeals court judge Thomas Willhite says that the presumption against in vitro fathers shouldn't be "so categorical," and that the family law code "does not preclude a donor from establishing that he is a presumed father."

Patric and Schreiber originally tried to have a child when they were dating almost ten years ago, but found out that natural conception would be difficult. In 2008, Patric gave Schreiber a letter in which he wrote that he was not ready to be a father, but that if Schreiber wanted to use his sperm to conceive, she had his blessing as long as she kept quiet about the agreement.

Jason Patric
The actor rejected fatherhood at first.

Patric is listed as the second “intended parent” along with Schreiber, on the informed consent forms the couple filled out prior to the in-vitro treatment. The procedure was successful and Gus was born in 2009. Although Patric claimed he was not ready to be a father, he quickly bonded with his newborn son. When the actor was working in New York, Schreiber and Gus would stay with him at his apartment there. When they weren't there, Patric communicated with Gus via Skype. This ended in 2012, when Schreiber reportedly cut off contact between the actor and his son.

In court, Schreiber attempted to foreclose any custody, and the judge reluctantly granted her a win, citing a 2005 California appellate case (Steven S. v. Deborah D.)

"I don’t think anyone is going to prevail as a result of this," said the trial judge reluctantly at the time. "I think at the end of the day that everyone turns out to be worse off, and certainly I think Gus turns out to be worse off as a result of where we’re going to end up. But it just is what it is, because I think that’s the legislative policy that’s been articulated.”

Patric’s subsequent appeal led to today's verdict.

More: Jason Patric Hits Back At Ex-Girlfriend's Request For Gag Order

Jason Patric
The ruling sets a precedent in family law.