OLATHE, Kan. (WDAF) — A Johnson County man pleaded guilty to distributing drugs that ended in the death of a toddler.

Court records show prosecutors originally charged 28-year-old Jean Pierre Morales with first-degree murder, child endangerment and drug possession in the case.

The drug plea is part of a deal with prosecutors that allows Morales to avoid a first-degree murder trial. It was scheduled to begin next month.

Police responded to an emergency call at a Merriam home on Nov. 14, 2020. Inside they found a two-year-old who was unresponsive and later died.

The Medical Examiner determined the child died from ingesting fentanyl.

Morales will be sentenced at a future date.