The teenager accused of killing his girlfriend's 2-year-old daughter will now stand trial as an adult.

Cody Feran-Baum, 18, waived his right to argue to remain in juvenile court. Instead, he will stand trial as an adult in the death of Sophia O'Neill.

His attorney previously said he would challenge Hennepin County to keep Feran-Baum's case in juvenile court.

In June, Feran-Baum was charged with second-degree murder in the death of Sophia, his girlfriend's daughter. The then-17-year-old told police that when she wouldn't stop crying, he kicked her in the back and stomped on her stomach. The attack tore her organs in half and broke her ribs. He had been babysitting the girl in the south Minneapolis home of his grandmother, Barbara Whetstone.

Feran-Baum, the girl and her mother, Sunshine Smith, had been staying at his and Whetstone's home in the 3800 block of 30th Avenue S., where the fatal beating occurred. Feran-Baum and Smith had been dating for the past year.

Before the girl's death, county child protection had several contacts with Smith and Whetstone.

Smith received parenting counseling several times when Sophia was born. The county also did an assessment of Whetstone when she became Feran-Baum's legal guardian in September 2013, according to court documents.

The year before, the county had begun a process to remove Feran-Baum, then 14, from his parents' home. Court documents said his mother was a longtime drug addict, while his father left the boy with girlfriends and strangers in order to sell drugs. That unstable home life, the documents said, led to Feran-Baum's drug use and poor school attendance. At one point, he was caught at school with a knife.

Social workers later said he had made great progress and spoke about being clean and sober.

During the brief hearing, Feran-Baum sat near his mother and grandmother, and spoke only to answer questions from Judge Nancy Brasel and his attorney.

After the hearing, someone shouted "I love you" as deputies led Feran-Baum outside the courtroom.

The county attorney's office will file an adult criminal complaint and set his first appearance.

Staff writer David Chanen contributed to this report.

Karen Zamora • 612-673-4647

Twitter: @KarenAnelZamora