BRENTWOOD, N.H. (AP) — A man has been sentenced to over seven years in prison in connection with the death of his 20-month-old stepson after the medical examiner's office determined the child died of acute fentanyl poisoning.

Leo Witham, formerly of Hampton, New Hampshire, pleaded guilty Thursday in Rockingham County Superior Court to negligent homicide, fentanyl possession and other charges.

Prosecutors said the child was in Witham's care in October 2016. Witham found the toddler unresponsive and took him to the fire department before fleeing to his apartment. He dropped a baggie of fentanyl in the parking lot. Police later found evidence of fentanyl in his apartment.

Prosecutor said it the case went to trial, the state's expert witness would have testified that the toddler ingested the fentanyl by taking it in his mouth and swallowing it.