A St. Paul drug dealer and repeat felon has pleaded guilty to supplying the heroin and fentanyl that led to one of his customers dying from an overdose.

Garyegus L. Cooper, 39, entered his plea Tuesday in Hennepin County District Court, admitting to second-degree sale of a controlled substance in connection with the June 2016 death of 33-year-old David A. Mack-Bohnhoff, of Orono.

Cooper is scheduled to be sentenced on Dec. 21 to a term of 8⅓ years. With credit for time in jail, Cooper will serve the first five years in prison and the balance on supervised release. He had been charged with third-degree murder, a count that would have meant a harsher sentence.

An autopsy determined that Mack-Bohnhoff died from ingesting a mixture of fentanyl and alcohol, with recent heroin use as a contributing factor.

A family member discovered Mack-Bohnhoff on June 25 on the floor in his bedroom and called the Sheriff’s Office. Authorities declared him dead at the scene and noted a recent puncture wound on his right arm.

Near the body were a lighter, a spoon holding illicit drugs, and needles. Also near Mack-Bohnhoff was a plastic baggie with heroin inside. Testing on the baggie turned up DNA matching Cooper’s, which was on file in the law enforcement database.

Investigators also located Cooper’s number on Mack-Bohnhoff’s cellphone.

Cooper’s criminal history in Minnesota reaches back to when he was 16 years old and was convicted of possessing crack cocaine. He also has two convictions on his record for felony assault.

The plea deal also calls for Cooper to admit to an unrelated promotion of prostitution charge, with the sentence for that crime to be served concurrently with the term for the drug-related conviction.