Insets, left to right: Maige Yang (Hennepin County Jail) and De'Ali Blia Delgado (GoFundMe). Background: The 11900 block of Castle Rock Court in Champlin, Minn., where Yang killed De'Ali (Google Maps).

A Minnesota mom who killed her 18-month-old daughter when she filled her bottle with a "significant amount" of sleep medication after she lost custody of the girl is headed to prison for decades.

Maige Elizabeth Yang, 24, was sentenced to more than 31 years in prison after she pleaded guilty to second-degree murder in the death of her daughter, De'Ali Blia Delgado.

Police in the Minneapolis suburb of Champlin responded Jan. 9 to a home in the 11900 block of Castle Rock Court. When cops arrived, they found a young child not breathing, a probable cause arrest affidavit said. Yang was also in medical distress after an apparent suicide attempt.

Both were rushed to the hospital, where the child was pronounced dead.

Officers spoke with Yang's parents, who said their daughter had a court hearing earlier that day during which a judge granted temporary custody to the girl's father. When Yang returned home, she took De'Ali and carried her to a bedroom upstairs.

Sometime later, Yang's father tried to enter the bedroom, but found the door locked, he told investigators.

He forced his way into the room and found his granddaughter on the floor with her lips turning blue. He said he grabbed the girl and ran downstairs before calling 911.

After receiving her Miranda rights, Yang admitted to pouring a "significant amount" of sleep medication into her daughter's bottle to "make the pain go away." She then fed the bottle to De'Ali, hoping the girl would "pass peacefully in her sleep," cops wrote.

More from Law&Crime: Man snatched young girl playing outside her family home before dumping her body wrapped in wallpaper just 1 block away, police say

De'Ali's father, Erick Delgado, started a GoFundMe to raise money for a funeral for his "beautiful princess." He wrote:

It's with my heart shattered that I write this post. My baby girl De'Ali Blia Delgado was not just taken away from me, She was murdered. I did everything right. Today I was suppose to wake up right next to my daughter.I had finally won custody of my beautiful baby on Friday, January 9th at 11:30Am and by 4Pm her life was gone. I fought my hardest for you, and the justice system failed you.

Her obituary said she loved to eat mashed potatoes and drink horchata.

"If you tried to take it away, she would let you know how she felt. She adored books, musical instruments, and anything that made noise," it reads. "She was always talking in her own sweet way, always dancing, bouncing up and down with delight. Bubbly, happy, and full of life, she was always smiling and loved being close to those she loved most."