A Minneapolis teenager pleaded guilty Wednesday to second-degree unintentional murder in the beating death of his girlfriend’s 2-year-old daughter.

Cody Feran-Baum, 18, of Minneapolis, is scheduled to be sentenced Dec. 22 and is expected to receive 25 years in prison — a significantly longer prison term than a person without a criminal history would normally receive, according to Hennepin County Attorney Mike Freeman’s office.

“The torture this little girl had to endure is sickening,” Freeman said. “It is good that Mr. Feran-Baum took responsibility for his vicious act and pleaded guilty. We promised when he was charged that we would seek a higher sentence and we have kept that promise.”

Feran-Baum, who was 17 at the time of the June 10 murder, was certified to be tried as an adult. But on Wednesday he gave up his right to a trial both on the murder charge and on the aggravating circumstances.

He admitted in court that he was alone in his grandmother’s house at 3857 30th Ave. S. and was taking care of his girlfriend’s daughter, Sophia O’Neill. The little girl was crying and Feran-Baum became frustrated. When she didn’t stop crying after he gave her food, he put her in a timeout.

Feran-Baum agreed with his attorney that “he lost it” and kicked her in the back more than once and then stepped on her back. When he saw Sophia’s health slipping, he gave her a bath. When that didn’t seem to help, he ran next door and told a neighbor to call 911.

When paramedics arrived, Feran-Baum admitted that he lied to them when he said she had drowned in the bathtub. That lie interfered with the treatment she received by the paramedics and later the doctors, Feran-Baum admitted.

The blows to the girl’s body broke bones and caused bruising and organ failure.