Former rap mogul Marion “Suge” Knight is to serve 28 years in prison for killing a businessman in a hit-and-run after a fight in Los Angeles.
The co-founder of the influential Death Row Records pleaded no contest to a voluntary manslaughter charge in a plea agreement with prosecutors ahead of his approaching murder trial.
Knight and Cle "Bone" Sloan, a consultant on the NWA biopic Straight Outta Compton, were involved in a fistfight outside a Compton burger stall that ended with Knight clipping Mr Sloan with his pickup truck.
He then ran over businessman Terry Carter, who died from his injuries, before speeding away from the scene.
Knight was charged with murder, attempted murder and hit-and-run following the January 2015 altercation.
His lawyers argued he was acting in self-defence.
Wearing an orange prison jumpsuit, Knight appeared at Los Angeles Superior Court to enter a plea.
The former record producer will be formally sentenced 4 October, when he will be given a 28-year jail term under the agreement with the Los Angeles County District Attorney's Office. He had faced life in prison if convicted of murder
As part of the plea deal, the murder charge against Knight will be dismissed along with separate charges of robbery and making criminal threats. .
Mr Carter's daughter, Crystal, sat in the front row of the courtroom and displayed no visible reaction during proceedings.
"I'm surprised he pleaded out," she said outside court. "Normally he likes the cameras to be on him 24/7."
Delays, detours and drama marked the run-up to Knight's trial, which was expected to begin on 1 October under tight security and secrecy.
Court officials had said no witness list would be released ahead of the trial and that some witnesses might not be identified by name during the case.
Knight collapsed during one court hearing, while two of his former lawyers were indicted on witness-tampering charges and his fiance pleaded no contest to selling a video of Knight hitting the two men with his truck.
While awaiting trial, Knight was also accused of threatening Straight Outta Compton director F Gary Gray.
His current lawyer, Albert DeBlanc Jr, appointed by the court five months ago, is his sixteenth. Knight tried to fire and replace him another lawyer just a day before the deal was reached.
Mr DeBlanc declined to comment after the hearing.
Ignoring warnings from judge Ronald Coen, Knight has talked extensively during hearings, complaining about jail conditions, his legal team and health issues.
While Mr Coen read legal language about the plea and told Knight he was subject to deportation if he was not a citizen, Knight prompted a smattering of laughs by asking: "ICE is coming to get me?"
He lost control of Death Row Records after it was forced into bankruptcy.
Knight has prior convictions for armed robbery and assault with a gun. He was sentenced to five years probation in 1995 for attacking two rappers at a Hollywood recording studio in 1992.
He was sentenced to prison in February 1997 for violating terms of that probation by taking part in a fight at a Las Vegas hotel hours before Shakur was shot dead in a drive-by attack as he rode in Knight's car.
No one has ever been convicted of Shakur's murder.
Additional reporting by agencies