The man who provided drugs to Mac Miller's drug dealer could face up to 21 years behind bars.
Stephen Walter, who was part of the supply chain that provided drugs to the rapper prior to his death in September 2018, pleaded guilty on Monday to distributing fentanyl.
Walter, one of three men arrested in connection to the rapper's death, agreed to a plea deal with prosecutors, according to a copy of the plea agreement filed in United States District Court for the Central District of California on Monday that was reviewed by PEOPLE.
According to the documents, Walter "knowingly and intentionally directed Ryan Michael Reavis to distribute fentanyl in the form of counterfeit oxycodone pills, to Cameron James Pettit" on Sept. 4, 2018.
David Wolff - Patrick/Redferns via Getty Mac Miller
Walter "knew that the pills that he directed Reavis to give to Pettit contained fentanyl or some other federally controlled substance, and at all relevant times intended for Reavis to distribute the pills to Pettit. Later that evening, at defendant's direction, Reavis delivered the pills to Pettit. Shortly thereafter, Pettit distributed these pill containing fentanyl to M.M.," the documents state.
Miller later ingested the counterfeit pills, along with alcohol and cocaine, and died on Sept. 7, 2018.
Never miss a story — sign up for PEOPLE's free daily newsletter to stay up-to-date on the best of what PEOPLE has to offer, from juicy celebrity news to compelling human interest stories.
According to prosecutors, Miller "would not have died from an overdose but for the fentanyl contained in the pills that M.M. had received from Pettit on September 4, 2018."
RELATED GALLERY: Mac Miller's Life in Photos
Walter faces between 17 and 21 years in prison, in addition to a $1 million fine.
"All parties agree that this is a just and fair disposition of the case," his attorney told Pitchfork.
Reavis and Pettit have both pled not guilty to similar drug charges, and are scheduled to go on trial in March 2022, according to Pitchfork.
If you or someone you know is struggling with addiction, please contact the SAMHSA substance abuse helpline at 1-800-662-HELP.