Given one last chance to plead guilty in the January 2013 killing of a 17-year-old youth, Justin Walker decided to take it.

Walker was among three defendants facing second-degree murder charges in the slaying of Aaron Ganier, who was found dead in the backyard of a 7th Ward house. But in a trial slated to begin Tuesday, he was going it alone.

Walker, the accused gunman, whispered, “I love you” to his mother sitting in the gallery of an Orleans Parish courtroom Tuesday morning, then agreed to a take-it-or-leave-it deal to plead guilty to manslaughter for a slaying committed when he was 15.

Now 18, he will serve a 35-year prison term under the deal, which came as Criminal District Court Judge Darryl Derbigny said he was ready to call for a jury.

Walker’s co-defendants in the case, Devonte Baker and Demond Bryant, continue to face murder charges, but Walker was pegged as the shooter and faced long odds for acquittal, said his attorney, Eric Malveau.

Dressed in black, Walker spent about 15 minutes in a back room with his mother and grandmother as they urged him to take the deal offered by prosecutor Iain Dover.

“It’s a tough pill to swallow for a young kid, but it’s the right thing to do,” Malveau said later.

The plea also resolves a pending battery charge against Walker from a jailhouse attack, allegedly with Baker, on 16-year-old Joshua Brady, another juvenile who was awaiting trial in Orleans Parish Prison, for armed robbery.

The OPP fight happened June 4, 2014.

“Best of luck to you,” Derbigny told Walker.