Actor Jason Patric has lost his legal battle for custody of his secret son.

Julia Roberts' ex-boyfriend donated sperm so his former girlfriend, Danielle Schreiber, could have a baby in 2009. They briefly reconciled their romance in 2011 but subsequently split, and last year (12) Patric decided he wanted to be a proper dad to her son Gus, so he launched legal action to gain joint custody, even though U.S. law only recognises him as a sperm donor, who has no paternity rights.

The case went to trial last week (ends15Feb13), but on Thursday (21Feb13), a judge ruled against the Speed 2 star and shut down his petition, according to

Schreiber had previously allowed Patric to spend time with the three year old, although it is not yet known if she will continue to permit the visits.