The Iowa dad of a 3-month-old baby whose body was found rotting in a swing was convicted for murder and child endangerment, according to reports.

Zachary Koehn, 29, was found guilty Tuesday in the death of his infant child, Sterling, who died last year in a baby swing in the bedroom of an Alta Vista home, the Des Moines Register reported.

Authorities said the boy’s dead body was infested with maggots Aug. 30, 2017, when officers were called to the home, which belonged to the defendant’s parents.

Prosecutors contended flies swarmed the baby while he was alive, laying eggs on him and hatching maggots. They also claimed feces left in his diaper ultimately caused an E.coli infection.

Graphic photos entered into evidence at the trial showed the deceased boy bleeding from the mouth with his eyes open.

An autopsy determined the infant died of malnutrition, dehydration and infection.

Both Koehn and the baby’s mother, Cheyanne Harris, were charged in the death. The 21-year-old mom’s trial hasn’t been scheduled.

The father will be sentenced at a later date to life in prison without parole, according to the Des Moines Register.