RELATED: See more pics of Jennifer Garner
Los Angeles County District Attorney's spokeswoman Jane Robison says Steven Burky pleaded no contest Tuesday to two counts of stalking the celebrity couple and their children.
RELATED: See more pics of Ben Affleck
Robison says a judge found the 37-year-old to be not guilty of the offenses by reason of insanity after a hearing. Burky was ordered to stay away from Garner, Affleck 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 daughter, a violation of a civil restraining order Garner obtained in 2008.