A DeKalb County teenager who shot and killed his 8-year-old cousin pleaded guilty Tuesday before a DeKalb County judge.

Charlie Oliver, 17, will serve 10 years in prison for shooting Solomon Zellner in the face on July 6, 2011, court officials said. The sentence, announced Tuesday in DeKalb Superior Court, carries the possibility for parole.

"Nobody wins," DeKalb District Attorney Robert James told The Atlanta Journal-Constitution. "He's still going to prison for 10 years, and there's a mother who has lost her precious child."

Oliver's attorney, DeKalb County public defender Ruth McMullin, said she was pleased with the outcome, but wishes she could have avoided bringing the case to adult court.

"I just hate that we couldn't get this to juvenile court, where [Oliver] wouldn't have an adult record," McMullin told the AJC.

Jury selection would have begun Tuesday had McMullin and Oliver not reached an agreement with DeKalb County prosecutors. Oliver was 16 when he shot Zellner and has said it was an accident.

According to police reports, Oliver said his finger caught on the trigger of a 9-mm handgun while playing in the room he shared with Zellner. It remains unclear where Oliver got the gun

Oliver was originally charged as an adult with felony murder and aggravated assault, but the plea deal reduced the charges to involuntary manslaughter during an unlawful act — that act being reckless conduct. As a result, he avoids a possible sentence of life in prison with the possibility of parole — a sentence that would have given him a minimum of 30 years in prison.

"I felt that given what we knew, and the [statements from] the witnesses we talked to, we had a really strong chance of getting an involuntary manslaughter conviction, with the underlying act being reckless conduct," McMullin said.

McMullin said prosecutors were convinced Oliver had in some way threatened young Zellner before the shooting, providing them motivation for seeking the aggravated assault charge that is the grounds for felony murder, or death caused during the act of committing a felony.

But 16-year-old witness DeQuintis Johnson recanted a story he initially told about what preceded the shooting, attorneys said.

"He told other people that the victim turned his head when the gun was pointed at him," James said, noting that a victim's perception of fear at Oliver's actions is what lead to aggravated assault, the underlying charge for felony murder.

"But the only remaining witness, other than the defendant, changed his story to one that described a scenario in which the defendant was handling the gun and the young child wasn't afraid of what he was doing," James said.

McMullin that change in stories could have been the difference between Oliver being charged as a juvenile or as an adult.

"He said that Charlie and Solomon were laughing and playing when the gun went off," she said. "If DeQuintis Johnson had said earlier what he said to the DA, this would have been in juvenile court.

Oliver will not receive the state's first offender status, authorities said.

A life sentence — a minimum of 30 years in prison — seemed a very real possibility until Tuesday morning, as Oliver rejected a plea deal earlier this month, despite the insistence of Zellner's mother, Angela Ramos.

The DeKalb District Attorney's Office said at the time that an agreement over just what those reduced terms would entail could not be reached. They would not say what terms were previously offered to Oliver.

Ramos, who had allowed Oliver to move into her home in an effort to help the troubled teen, had convinced prosecutors to reduce the charges against him.

"The only thing I recommend for him is counseling or something and that he get his education ... so when he does get out, he will be able to have a life," Ramos told the court, Channel 2 Action News reported.