CAMDEN -- The father accused of killing his toddler son has pleaded guilty to aggravated manslaughter weeks before a second trial was set to begin, authorities said.

David "D.J." Creato Jr., of Haddon Township, entered the plea Wednesday morning in the death of his 3-year-old son Brendan Creato at Camden County Superior Court, according to the Camden County Prosecutor's Office.

Creato received 10 years in jail in exchange for the plea and will be eligible for parole in eight-and-a-half years, authorities said.

Brendan was found dead in 2015 in a Cooper River Park creek near his father's home. He was wearing pajamas and socks, and Creato's attorneys argued that Brendon had left the home overnight and wandered down to the creek on his own.

An autopsy showed that the young boy had asphyxiated, dying after he was smothered or drowned. Prosecutors noted that Brendon was likely placed in the stream, as his socks were free of mud and dirt.

The prosecutor's office argued that 24-year-old Creato had killed the boy because his girlfriend did not like that Creato was a father, and had given him an ultimatum, telling him to pick her or his son.

On Wednesday, Creato stated under oath that he "recklessly caused his son's death under circumstances manifesting extreme indifference to the value of human life by depriving Brendan of oxygen," according to the prosecutor's office.

The initial trial bringing a murder charge against Creato ended with a deadlocked jury in late May. A new trial had been scheduled to begin next month.

A sentencing for Creato will take place September 29.

Amanda Hoover can be reached at ahoover@njadvancemedia.com. Follow her on Twitter @amahoover. Find NJ.com on Facebook.