More than two years after he participated in a mid-afternoon ambush in which a trio of gunmen snatched a 31-year-old man from his vehicle and shot him to death, a suspect charged in the case pleaded guilty Tuesday to manslaughter.

Christopher Peterson, who turned 27 on Tuesday, received a 30-year prison sentence in exchange for his plea. He had been indicted on charges of manslaughter and second-degree murder.

The plea deal came together at the last moment, just before a jury was to begin hearing opening statements at a trial in Criminal District Court Judge Camille Buras’ courtroom.

It was not immediately clear whether anyone else has been arrested in the case.

The shooting occurred Sept. 6, 2012, in the 3000 block of Audubon Street in Gert Town.

Prosecutors said the victim, Teron Crawford, was in his car when three people, two of them with covered faces and guns, tried to pull him into their own vehicle.

There was a struggle, and the men shot Crawford five times. He died at the scene.

Surveillance video from a nearby home led police to Peterson, according to prosecutor Brittany Reed. Police then found his fingerprints and DNA on the car.

Court documents show Peterson’s arrest history began 10 years ago, when he was picked up on his 17th birthday for carrying an illegal weapon. He was found not guilty on that charge, but over the past decade, he racked up convictions on charges of illegal weapons possession, burglary and battery.

Peterson’s attorney, Martin Regan, said after the court session Tuesday that the fingerprint evidence was one of the reasons Peterson accepted the plea deal.

“He decided it was in his best interest to plead to manslaughter and (get) 30 years,” Regan said.

Buras said Peterson spent nearly two hours speaking with his attorneys and his family Thursday morning before deciding to plead guilty.

Crawford’s relatives were consulted and approved of the plea agreement before it was accepted, according to Reed.

Crawford’s mother, Ernestine Crawford, delivered a tearful statement in front of the judge.

“Before I made it to the crime scene, he was gone,” she said. “Now I have to visit him in the cemetery.”

Buras then made her own statement about the city’s persistent gun violence.

“I kind of wish we could amplify Mrs. Crawford on a loudspeaker every day and every night to the entire city, because no matter how long I’ve done this, I can’t understand it,” she said.

She then ordered Peterson remanded to the custody of the Department of Corrections.

One of Peterson’s supporters mouthed “Happy birthday” to him before he was escorted out of the courtroom by a sheriff’s deputy.