It was a crime that riveted South Jersey: A young father charged with killing his 3-year-old son.

On Wednesday, three months after a mistrial in the case, the uncertainty ended.

David "D.J." Creato Jr. pleaded guilty to killing 3-year-old Brendan, whose body was found in woods near his Haddon Township home in October 2015.

Under the plea agreement, Creato, 23, will serve a maximum of 10 years in prison for aggravated manslaughter. He will be required to serve 8½ years before he can be paroled and is set to be sentenced Sept. 29 in Superior Court in Camden.

The surprise plea came 2½ weeks before Creato was to go on trial a second time for murder, on Sept. 11. Jurors were unable to reach a verdict at a trial in May after three days of deliberation and a 10-day trial in which prosecutors alleged that he killed the boy in a desperate attempt to prevent his girlfriend, who disliked Creato's having a child, from leaving him.

No specific cause of death was determined. Three medical examiners ruled that Brendan died of  "homicidal violence" but could not determine whether he was drowned, strangled, or smothered. In court Wednesday, Creato admitted that he "recklessly caused his son's death under circumstances manifesting extreme indifference to the value of human life by depriving Brendan of oxygen."

Brendan's mother, Samantha Denoto, and other family members who attended the trial were present for the plea before Superior Court Judge John T. Kelley.

Assistant Prosecutor Christine Shah, who tried the case with Assistant Prosecutor Kevin Moran, declined to comment on the plea. Creato's attorney, Richard Fuschino, did not return a request for comment.

After prosecutors tried the case in May, 10 jurors believed Creato was guilty, but two concluded there was not enough evidence to convict him.

"It's a very happy day right now," one of the 10 jurors who voted to convict said Wednesday. She asked to only be identified by her first name, Lydia. "Justice has been served."

During his trial, prosecutors argued that Creato killed Brendan to prevent his girlfriend, who had demanded she be Creato's top priority, from leaving him. As evidence they presented numerous text messages and other communications between Creato and Julie Stensky, who often expressed displeasure at Brendan's role in Creato's life. At one point, Stensky, who had left for college in New York, wrote online that the child was "a mistake" who would anchor Creato to New Jersey forever.

The defense argued that Creato was the victim of a flawed police investigation and that authorities had only circumstantial evidence to link Creato to his son's death.

Creato called 911 around 6 a.m. on Oct. 13, saying he woke up and discovered that Brendan was missing. The call followed a night during which he had argued with Stensky. There was no sign of forced entry to his second-floor apartment.

Brendan's pajama-clad body was found about three hours later, slumped over a rock and partially submerged in a creek in woods about three-quarters of a mile from Creato's apartment. The bottoms of the socks on his feet were clean, suggesting he had not walked there on his own.

Creato was arrested and charged with murder three months later and has remained in the Camden County Jail on $750,000 bail.

Wednesday afternoon, Creato's parents did not answer the door at their Haddon Township home, though two cars were parked in the driveway. Two blue bows were tacked to lanterns at the entrance to the house, next to flower boxes with cheery yellow flowers. Another ribbon was attached to the branch of a tree in the front yard.

Three neighbors on the block declined comment, with one saying that the news was "very, very sad," but that she didn't want to attract any media attention.

In December, a memorial bench was installed near the spot where the child's body was found, dedicated to him by Camden County officials and his family.

Unlike in the days just after the child's body was found and during the trial, the bench was stark Wednesday. There were none of the balloons and teddy bears that once adorned the spot in tribute to the child.

But a laminated note left there by someone read: "Do not think of his final thoughts, hopefully painless, when he did not understand what was happening to him by whom. Someday … at some time, the person that would do the unthinkable will be brought to justice either here on earth or later."

Staff writers Michael Boren and Jan Hefler contributed to this article.