A middle-aged man is looking at 25 years behind bars for molesting a little girl as she sat on his lap, court officials said Thursday.

Jon Gregory Craton, 47, was found guilty of sexually assaulting a 4-year-old girl during the summer of 2014. The attack caused the girl to suffer from nightmares and post-traumatic stress disorder, Cobb County District Attorney spokeswoman Kim Isaza said in news release.

Because Craton told the child that she would be in trouble if she told anyone, the girl exhibited a drastic change in behavior, including nightmares and fear of being alone in her own bed for weeks and months following the abuse, according to the release.

The girl finally told her godmother what happened, and the girl’s parents called police. After examinations and counseling, a doctor diagnosed the child as having PTSD from the assault, according to investigators.

“Because of this defendant’s selfish act, this victim has been robbed of the young, precious years that every child deserves,” said Assistant District Attorney Susan Treadaway, who prosecuted the case. “The defendant has sentenced this little girl to a lifetime of emotional pain.”

Judge Adele Grubbs sentenced Craton to serve 25 years in prison without parole and life on probation. Craton must also adhere to sex-offender conditions and monitoring, Isaza said in a statement.