FRESNO, Calif. (KFSN) -- The man accused of kidnapping and raping a little girl nearly ten years ago, will not be going to trial.
Gregorio Gonzalez instead reached a plea deal that will spare him from life in prison without parole.
The case against Gonzalez drew national attention. An 8-year-old was playing outside with friends when she was kidnapped, kept overnight and sexually assaulted, then left in a remote part of Fresno County.
RELATED: Abducted Fresno girl safe at home, suspect in custody
Now, Gonzalez is taking responsibility.
"My client was relieved. I think what also occurred is it prevented the complaining witness from undergoing further testimony, and I believe that was one of the key issues in this case, and he's going to do some significant time in prison," said Gonzalez' attorney Eric Castellon.
As part of terms of the deal, several counts were dropped that would have made Gonzalez eligible for life without the possibility of parole.
He pleaded no contest to sexual crimes with a child under 10 years old and will be punished by a term of 40 years to life.
ABC30 legal analyst Tony Capozzi says the plea deal is a fair resolution for everyone involved.
"To have to come in and relive what she went through would be very difficult for the victim. On the defendant's side, he knows now what his sentence most likely is gonna be. The minimum is going to be 40 years," Capozzi said.
Gonzalez was in his early twenties when the crime took place. Since the laws have changed over the years, he could have been eligible for less prison time and more rehabilitation options.
Eric Castellon took over the Gonzalez case three years ago. He said previous lawyers focused more on legal arguments instead of factual elements. DNA evidence played a significant role in what would have been presented at trial.
"So we had to deal with a lot of DNA issues, locations of DNA, as well as whether or not the DNA was a match. And that was critical to the defense," he said.
RELATED: Nearly a decade and still no trial for man accused of sexually abusing and torturing 8-year-old girl
A day before the trial was set to start, the plea deal was reached. Capozzi said it provides justice to the young victim and the community.
"He's served at least ten years, he's been in custody all this time. Society has been protected. He will have maybe another ten years to go or more. But I think, all in all, the resolution is a good resolution both for the prosecution and the defense in this particular case."
Gonzalez will return to court in November to be formally sentenced by a judge.
Gregorio Gonzalez, accused of kidnapping, raping 8-year-old Fresno girl, reaches plea deal
CHILD SEX ASSAULT