GEORGETOWN, Texas — A Central Texas man who spent the last three years in prison for the molestation of a 4-year-old boy has been released on bond after his attorneys argued the wrong man had been convicted.

Greg Kelley was released Tuesday from the Williamson County Jail after posting bail, which had been set at $50,000. It came after state District Judge Donna King ruled that Kelley’s due process rights were violated in the investigation of the 2013 crime. The case has been referred to the Texas Court of Criminal Appeals.

Earlier this month, Williamson County District Attorney Shawn Dick, who took office this year, apologized for what he says was a wrongful prosecution for the child’s sexual assault.

Authorities have identified another suspect.