It was touch and go for a while, but Frederick Harper entered a plea Thursday that could result in him spending 35 years in prison for beating a 3-year-old boy in 2016. Harper’s third sentencing hearing is set for Jan. 17.

The child suffered injuries so severe that he was hospitalized for weeks with a brain hemorrhage.

Thursday, that boy — newly adopted to a family living outside of the Grayson County area — walked into the courtroom on his own and showed Judge Larry Phillips some of the injuries sustained in the attack.

The child smiled brightly at the woman who is now his mother and practically ran into her arms in the center of the courtroom. That smile and the fast pace were a stark change from the child who first arrived in foster care.

The woman’s first name is Stephanie and asked that her last name not be used in print. She testified that the child who first came into her home was in a wheelchair and wore a helmet because of the seizure disorder. He also had paralysis on his left side. Now, he wears braces on his legs and still has serious vision issues as well as other neurological issues that will prevent him from ever fully recovering.

Still, she called his progress so far remarkable.

What led that youngster to need such remarkable recovery is a beating that prosecutors said came at the hands of Harper while the child’s mother was away from the home in 2016. The child was rushed to Wilson N. Jones Medical Center with injuries so severe he was flown to Children’s Medical Center in Dallas. There he was treated by a team of doctors including Dr. Suzanne Dakil, who testified Thursday that she is board certified in child abuse pediatrics.

She said the injuries that the child sustained were not possible from Harper’s explanation that the child was running through the house, slipped and fell. She said the injury was so severe that the child would have likely been showing symptoms immediately and would not have been possible for an adult not to have recognized there was something seriously wrong with the child. She testified that her speciality is to look for ways to discount testimony that injuries such as those suffered in this case happened by anything other than child abuse.

But Dr. Daki’s speciality shouldn’t have been needed on Thursday. After all, Harper’s case had been set for a sentencing hearing. He had pleaded guilty in February to intentionally causing serious bodily injury to the child. Harper had been out on bond while awaiting a trial on that charge and when it came to the day for the trial, Assistant Grayson County District Attorney Britton Brooks said Thursday, Harper said he couldn’t go through with the jury trial. Brooks said he and Harper’s then attorney Lucinda Brese-Lebron explained the offered deal to Harper. The deal capped the sentence that Harper could receive for the crime at 35 years even though the sentencing range included a life sentence.

In court on Thursday, Harper testified that he felt like he didn’t have any choice but to take that deal. He said he and Brese-Lebron hadn’t prepared for trial. He said that he thought he was pleading guilty to a lesser included charge when Judge Rim Nall questioned him about the plea. Nall allowed Harper to remain out on bond pending his sentencing hearing that was set for April 11. Though Nall had warned Harper that if he did not appear at that sentencing Nall could sentence him beyond the 35 years, Harper ran.

He was eventually brought back to Grayson County and given a new attorney. On Thursday, Carl White asked that his client be allowed to withdraw his guilty plea and that the case of who injured the boy and how be set for a jury trial. After being given an opportunity to look over the transcript from the original hearing, and to talk with his client about his understanding of where the case stood at this point, White was allowed to present evidence.

White presented the court with Harper’s testimony that he didn’t understand the proceedings on the day that he entered his original plea. Harper said he and Brese Lebron hadn’t met enough to be prepared for trial. He also said when he signed the paperwork that said he would plead guilty to intentionally injuring the child, he thought he was signing on for a deal that had been offered earlier which was a lesser included charge.

Brooks presented Brese-Lebron who said she couldn’t get Harper to meet with her when he was her client. She said there was no indication of the day of the original plea that Harper didn’t understand what was going on.

Phillips refused to allow Harper to withdraw his plea. He then asked both attorneys if they were ready to proceed with the sentencing hearing and Brooks said he was.

At first, Harper said he was too. Then, he said he was not. That answer led to another round of talks. Brooks had witnesses on hand who had come into town just for the hearing and would have to come back if they reset the case. Phillips decided that those witnesses, the adoptive mother and the doctor, could go ahead and testify which they did.

Harper was offered the 35-year sentence for abusing the child and an additional five years stacked on top of that for failure to appear, but turned it down. The charge of failure to appear will be set for trial for something early in the coming year, Phillips told attorneys.