LOS ANGELES — A 23-year-old Hollywood Hills man was arrested Wednesday morning in connection with the death of rapper Mac Miller, who died of a drug overdose last September, the Drug Enforcement Administration announced.

Cameron James Pettit is accused of selling counterfeit pharmaceutical drugs containing fentanyl to the hip-hot artist — whose real name was Malcolm James McCormick — two days before his death in Studio City on Sept. 7, 2018, a DEA news release stated. Miller was 26 years old.

The Los Angeles County coroner’s office determined he died of mixed drug toxicity involving fentanyl, cocaine and alcohol, and his death was ruled an accident.

Pettit has been charged with a federal count of distribution of a controlled substance, according to the DEA. He’s expected to make his first court appearance in downtown L.A. on Wednesday afternoon.

An affidavit detailed communications in which Pettit agreed to supply 30 milligram oxycodone pills, cocaine and Xanax to Miller, according to the release.

Authorities allege Pettit didn’t provide genuine oxycodone to the rapper, but instead sold him counterfeit oxycodone pills laced with the powerful synthetic opioid fentanyl.

Miller purchased the alleged fentanyl-laced pills on Sept. 5, 2018.

Two days later, he was found unresponsive inside his home in the 11600 block of Valleycrest Drive and pronounced dead shortly before noon.

Investigators believe Miller died after the snorting counterfeit drug, and that they were furnished by Pettit, according to the affidavit. It went on to state that other pills supplied to Miller by another alleged dealer before he died did not contain fentanyl.

Hours after Miller’s death was reported, Pettit messaged a friend, allegedly writing, “Most likely I will die in jail,” according to the affidavit.