A judge has sentenced a 26-year-old Blaine man to more than 30 years for fatally beating his girlfriend's toddler and fleeing the state with her little girl.

Nelson Soto-Lopez pleaded guilty Monday to second-degree murder and was immediately sentenced in Anoka County District Court to the maximum term for the November 2016 killing of 21-month-old Drake Oliva.

With credit for time served since his arrest, Soto-Lopez will serve the first 19½ years in prison and the balance on supervised release.

The boy's mother, 27-year-old Heydi Aguilera-Bustillo, also of Blaine, was sentenced earlier to about 14 years and will be in prison for more than eight years and then put on supervised release.

Soto-Lopez entered what is known as a Norgaard plea, meaning he contended that he couldn't recall the events because of intoxication or amnesia but acknowledged that there was enough evidence for a conviction.

Authorities found Soto-Lopez soon after the killing in Missouri, where he had fled with his girlfriend's 5-year-old daughter.

Aguilera-Bustillo gave police varying accounts of how Drake was injured, but eventually told police Soto-Lopez took the crying boy to a bedroom, where she could hear Drake being hit with a belt. She said he had hit her son with a belt at least twice before.

Soto-Lopez then came out of the bedroom and dropped him on his head, she said.