A judge is sending a man arrested outside a school attended by Jennifer Garner and Ben Affleck's daughter to a state mental hospital.
Los Angeles County District Attorney's spokeswoman Jane Robison says Steven Burky pleaded no contest to two counts of stalking the celebrity couple and their children.
Robison says a judge found the 37-year-old to be not guilty of the offences by reason of insanity after a hearing. Burky was ordered to stay away from the celebrity couple and their family for 10 years if he is released.
Burky was arrested in December outside a school attended by one of the couple's daughters, a violation of a civil restraining order Jennifer obtained in 2008.