Oscar Aguirre, accused of beating his girlfriend's 2-year-old daughter, causing her spleen to detach, pleaded guilty to child abuse charges Monday.

At the request of Aguirre's defense attorney, Pima County Superior Court Judge Jane Eikleberry agreed to seal the plea agreement because of how the charges could affect Aguirre in prison.

Aguirre, 30, was caring for the toddler on Jan. 14, 2012, when he called 911 because she was having trouble breathing.

The girl was taken to the hospital with bruises all over her body, and doctors found a punctured lung, four broken ribs and injuries to her spleen and kidney, according to court documents.

Two days later, during exploratory surgery, doctors discovered her spleen was detached and free-floating; her pancreas and bowels were bruised; and she had tears to her liver, abdominal wall and transverse colon, documents said.

Aguirre was indicted on attempted second-degree murder and child abuse charges.

On Monday, he pleaded guilty to two counts of second-degree child abuse.

He is scheduled to be sentenced June 3 and faces between five and 20 years in prison. If he had gone to trial and been found guilty, he could have been sentenced to 20 to 48 years.

Aguirre's attorney, Rafael Gallego, did not elaborate on any justification for sealing the records beyond asserting the nature of the crime would make Aguirre's time in prison more difficult.

Eikleberry agreed to the request without comment. The prosecutor did not object.

Officials with Pima County Superior Court and Arizona Supreme Court said they could not comment on how often criminal plea agreements are sealed, or if there are any conditions that must be met to seal the records.

The girl's mother, Ashlee Nichole Liberty, 25, pleaded guilty in April to one count of child abuse for failing to seek prompt medical attention for her daughter. She is scheduled to be sentenced in May.

Contact reporter Veronica Cruz at vcruz@azstarnet.com or at 573-4224.