A father set to be retried next month in the death of his son has pleaded guilty to one count of first-degree aggravated manslaughter in the child’s death, the Camden County Prosecutor’s Office announced Wednesday.

David Creato Jr. pleaded guilty Wednesday before the judge who presided over Creato’s trial earlier this spring. The trial had resulted in a mistrial on May 31 when the jury could not reach a unanimous verdict.

The prosecution had argued that Creato killed his 3-year-old son, Brendan, because he feared his 17-year-old girlfriend was going to leave him. The girlfriend was never charged, and the couple has since broken up.

The prosecutor’s office said Creato stated under oath in court Wednesday that he recklessly caused his son’s death under circumstances manifesting extreme indifference to the value of human life by depriving Brendan of oxygen on Oct. 13, 2015.

During his trial, the 23-year-old Creato had maintained that Brendan wandered away from his Haddon Township home. The boy's pajama-clad body was found hours later about a mile away.

Under the terms of the plea agreement, Creato will be sentenced to 10 years in New Jersey state prison. He will be required to serve at least eight years and six months of his sentence before he is eligible for parole.

Brendan’s mother, Samantha Denoto, and other family members who attended the lengthy trial were present in court for the plea, the prosecutor’s office said.

(AP Photo/Evan Vucci) Rep. Richard Neal, D-Mass., left, and Rep. Kevin Brady, R-Texas, right, listen as President Donald Trump speaks during a meeting with members of the House Ways and Means committee in the Roosevelt Room of the White House, Tuesday, Se