A man was sentenced Monday to 17.5 years in prison and five years of supervised release in Los Angeles federal court in connection to the 2018 overdose death of 26-year-old rapper Mac Miller.

Stephen Andrew Walter, 48 and of Westwood, California, is now the second drug dealer to be sentenced to more than a decade behind bars over Miller’s death. 

Ryan Michael Reavis, 39, was sentenced in April to nearly 11 years in prison after previously pleading guilty to a single count of distribution of fentanyl. The case against a third dealer, Cameron James Pettit, 30, of Los Angeles, remains pending as prosecutors sought last October to postpone it. 

DRUG DEALER WHO SOLD MAC MILLER FENTANYL-LACED PILLS SENTENCED TO MORE THAN A DECADE IN PRISON 

rapper mac miller seen performing

Mac Miller performs at the Okeechobee Music and Arts Festival in Florida in 2016. Miller died of an overdose in Los Angeles in 2018.  (Rolando Otero/South Florida Sun Sentinel/Tribune News Service via Getty Images)

Walter struck a deal with federal prosecutors in October to serve 17 years if he pleaded guilty to one count of fentanyl distribution, a reduced charge from the original distribution of fentanyl resulting in death, the Los Angeles Times reported. But U.S. District Judge Otis D. Wright II rejected the agreement Monday, arguing that Walter continued to distribute dangerous substances after Miller’s death. 

"The court has elected not to accept that plea agreement. So, sir, if you want, at this point, you can withdraw your guilty plea and go to trial," the judge said Monday, according to Rolling Stone. "I may as well lay it out, okay. When you continue to engage in this activity even after your activities killed someone, I’m having a tough time not staying within the guidelines."

Wright said Miller’s "celebrity" status had nothing to do with his decision to move closer to the maximum sentence of 20 years for the charge.  

mac miller seen holding a microphone on stage

Mac Miller died of an overdose in 2018. (AP)

"This was a human being who unwittingly took something that will flat out kill you, and I have no idea why we have people out here dealing in this stuff, peddling this stuff," the judge said. "This is what upsets me. Everybody now knows this stuff will kill you." 

Miller, a rapper from Pittsburg, Pennsylvania, whose real name was Malcolm James Myers McCormick, was found unresponsive by his assistant inside his Los Angeles home on Sept. 7, 2018. 

Los Angeles County Medical Examiner and Coroner ruled the Miller died from an accidental overdose caused by a lethal cocktail of fentanyl, cocaine, and alcohol, FOX 5 San Diego reported. 

CLICK HERE TO GET THE FOX NEWS APP

The indictment says Walter provided pills containing fentanyl to Reavis and Pettit for distribution. Pettit is accused of later selling cocaine, Xanax and 10 "blues" — counterfeit oxycodone pills laced with fentanyl – to Miller about three days before the rapper died, according to the Times. In court, Walter apologized to Miller's family but claimed he did not know he supplied the pills that caused the rapper's death until his arrest

Pharmaceutical fentanyl, a synthetic opioid 50 to 100 times more potent than morphine, is sold through illegal drug markets for its heroin-like effect and is the primary driver of overdose deaths in the U.S., according to the Centers for Disease Control and Prevention. Overdose deaths involving synthetic opioids were nearly 12 times higher in 2019 than in 2013 and have accelerated since the pandemic.