A babysitter accused of severely burning an autistic child to "teach her a lesson" after she soiled herself abruptly ended his jury trial Wednesday, opting instead to plead guilty.

As a result of the plea agreement, prosecutors will ask for no more than 50 years in prison when Victor Acosta II is sentenced next month before state District Judge Mary Roman. If found guilty by a jury, he could have faced up to life in prison for the injury to a child-serious bodily injury conviction.

Acosta, 31, was arrested in July 2009, after Brenda Solis, then 8, was admitted to Santa Rosa Children's Hospital with 2nd- and 3rd-degree burns on her legs and buttocks.

During the three days of testimony, jurors were shown graphic photos of the girl's bright-red skin, peeled in large swaths off her body. She is still undergoing skin-graft surgeries and physical therapy for the long-term injuries, prosecutors said.

Acosta, an ex-boyfriend of the girl's mother, had been babysitting her and her siblings while the mother went to a movie, according to court documents. Acosta acknowledged to police putting the girl in the shower, but he said the water was not scalding when he left the bathroom to attend to another child.

The child must have turned the water up herself, he told police. Defense attorney Michael Sawyer indicated to jurors during an opening statement last week that his client didn't directly cause the injuries.

But the girl's 8-year-old brother told jurors he heard Solis screaming, and that Acosta never left the bathroom. Pediatrician James Lukefahr, who was called by prosecutors, testified that the burns were consistent with someone being restrained in a shower.

A test of the shower showed water reaching up to 157 degrees. Human instinct, even among those with severe autism, would be to step out of the water, Lukefahr said.

Prosecutors Chris DeMartino and Catherine Wilson rested their case Tuesday. Sawyer, who could not be reached for comment Wednesday, was set to begin calling witnesses when the plea agreement was reached.

Because of a prior trip to prison, Acosta will face a minimum sentence of 15 years incarceration for the first-degree felony. He will have to serve at least half of the sentence before he can be eligible for parole.

Given the seriousness of the injuries, DeMartino said, "we feel confident in being able to ask (the judge) for 50 years."