The onetime boyfriend of an Eagan foster mother was sentenced Tuesday to a 25-year prison term for fatally beating a 3-year-old boy in her care.

Charles Homich, 28, pleaded guilty earlier to second-degree murder in connection with the June 2017 death of Zayden Lawson while the boy was under the care of Zeporia Fortenberry, 32.

With credit for time in jail since his arrest, Homich will serve just shy of 16 years in prison and the balance on supervised release.

"We are pleased to have brought Charles Homich to justice in connection with this tragic case that claimed the life of this little boy," County Attorney James Backstrom said in a statement.

Fortenberry pleaded guilty to second-degree manslaughter for her role in the killing and was sentenced in June to a nearly 3 ½-year term.

Police and paramedics were called to Fortenberry's townhouse after she said the boy had stopped breathing. She said the boy had complained throughout the day that his stomach hurt.

Fortenberry said she lived with her two biological children, along with Zayden and his younger brother. Because she worked the night shift, someone else would watch the children while she was gone. She said the night before had been the first time she had let Homich, who lived with them, babysit.

Fortenberry knew that Homich was punching Zayden for weeks before he died. She said Homich would lose his temper whenever he had to change Zayden's diaper.