The man prosecutors say supplied the deadly pills that killed Mac Miller has acknowledged wrongdoing -- copping a plea deal that could see him behind bars for a long while.
According to court docs, obtained by TMZ, Stephen Walter entered a guilty plea with the feds on one count of distribution of fentanyl. The other drug-related charge -- conspiracy to distribute a controlled substance -- was dropped.
Prosecutors alleged Walter was the one who indirectly gave Mac's alleged dealer, Cameron James Pettit, deadly Percocet tablets that ended up causing MM to OD. As we reported, Pettit hit up Walter ... who then sent a runner to drop them off that fateful night.
As far as what's on the table for punishment ... the docs note there's a maximum sentence he could face -- more than 20 years in prison -- plus a lifetime of supervised release and a fine of $1 million. Prosecutors are recommending 17 years in prison and 5 years supervised release.
There's also this ... prosecutors make a point to say that Walter pleading guilty here means he was fully aware of what he was pawning off that night -- counterfeit oxycodone pills laced with fentanyl.
And, remember ... Walter was ALREADY on supervised release from a previous drug case in which he was involved.