This comes after Sanchez pleaded no contest to involuntary manslaughter and child endangerment charges for the death of Maddix Ramsour.
"The court discussed it about the way the medical evidence is going right now, that this was the best resolution for the circumstances in this particular case, and just to give the family closure," said prosecutor Sara Rosenthal.
On Thursday, a judge sentenced him to five years but because he already served the time, he will be let out of custody.
Sanchez was arrested in 2015 for the death of the infant. He claimed the baby died after rolling off the bed, however, pathologists testified the injuries appeared more severe.
Initially, Sanchez was found not guilty of murder charges however, a jury could not agree on other charges related to the case so he was scheduled for a second trial over the summer.
He later took the plea deal.
"He killed our baby, he killed Maddix," said Ramsour family.
Andrew Sanchez will walk free by the end of today. He pleaded no contest to child endangerment and involuntary manslaughter charges in the case of 9 month old Maddix Ramsour. Attorneys say he was sentenced to 5 years, but has already served the time. @ABC30 pic.twitter.com/vyNj4rFWrN— Nathalie Granda (@NathalieABC30) January 18, 2018
Members of Ramsour family spoke to the child's father in court. They asked not to be shown on camera but tearfully stated that they do not believe justice was served.
"In the end, the system failed the one innocent party in this matter, Maddix," said Ramsour family.
Sanchez's attorney commented on the case, saying quote "Everything that needs to be said about this case has been said, including the judge's remarks about the ongoing controversy that surrounds the science of traumatic brain injury."
She also says her client is innocent, saying quote "his plea was to mitigate risk, not admit guilt."
Sanchez will no longer be behind bars, but attorneys say he will be on parole and is not allowed to contact his son's mother.