5:20 PM PT -- Pettit has been ordered to be held without bond. He is set to be arraigned on October 11.
Mac Miller was supplied deadly, fentanyl-laced pills that directly contributed to his death -- according to federal prosecutors, who just filed charges against his alleged dealer.
Charges came down Wednesday against 28-year-old Cameron James Pettit, whom the feds allege supplied the rapper with counterfeit oxycodone pills that contained fentanyl in a new 42-page criminal complaint out of the Central District of California.
Per the docs, prosecutors claim Mac had asked Pettit for "percs" -- short for percocet, a prescribed painkiller full of oxycodone -- and that the dealer ended up supplying the pills that contributed to Mac's overdose death last year. The AP was first to report the story.
TMZ broke the story ... Mac Miller was found unresponsive in his Studio City home. His death was later ruled an accidental overdose from alcohol, cocaine and fentanyl.
According to the charging docs, authorities served search warrants at multiple locations while investigating Mac's death. They say that two days before his death on Sep. 7, Mac received two deliveries of drugs -- one from Pettit, who allegedly supplied the fentanyl-laced oxy pills, cocaine and Xanax -- and another from a prostitute, who allegedly gave him pure oxy, hydrocodone, amphetamine, Xanax and coke on top of what Pettit had dropped off.
Prosecutors say that the prostitute works for a madam, whom is allegedly associated with Pettit. They claim that when Pettit had not immediately responded to Mac for a second delivery, he hit up the madam, who sent the prostitute to leave him the additional drugs.
There's more -- prosecutors allege that Pettit directly messaged about Mac's death shortly afterward on Instagram, allegedly telling friends that he probably shouldn't post anything as a reaction "just to be smart." Prosecutors say he later wrote, "I am not great ... Most likely I will die in jail" when someone asked how he was doing.
The criminal complaint that Pettit was one of three people who supplied Mac with the counterfeit drugs. It's unclear if the two others -- presumably the madam and the prostitute -- have been charged yet.