A man has been arrested for allegedly selling drugs laced with fentanyl to Mac Miller, the rapper who died of an accidental drug overdose last year at just 26.

The U.S. Drug Enforcement Administration said Cameron James Pettit, 23, of Los Angeles, sold Miller cocaine and Xanax, as well as counterfeit oxycodone pills that they believe he snorted before he died two days later. In fact, officials said the latter contained the synthetic opioid fentanyl, which they described in a news release as “50 times more potent than heroin.”

Mac Miller pictured in March 2018, just a few months before his death. (Photo: Mauricio Santana/Getty Images) More

Authorities alleged in an affidavit, obtained by Los Angeles news station KTLA, that after the news broke about Miller’s death, Pettit messaged a friend, “Most likely I will die in jail.”

Miller, whose legal name was Malcolm James McCormick, received drugs from others before his death, too, but those drugs didn’t contain fentanyl. According to TMZ, on the same day Pettit made his delivery to Miller, a prostitute allegedly made a separate drug drop-off. In that batch, the singer was allegedly given pure oxycodone, hydrocodone, amphetamine, Xanax and cocaine. According to prosecutors, the prostitute works for a madam who was allegedly associated with Pettit. So when Pettit didn’t initially respond to Miller’s drug order, the star contacted the madam, who sent the prostitute over with the additional drugs.

Pettit is charged with distributing a controlled substance. He appeared in an L.A. courtroom Wednesday afternoon, where he was ordered to be held without bond, TMZ reported. He faces up to 20 years in prison.

It’s unclear if the other non-fentanyl drug suppliers will be charged. Law enforcement officers are cracking down on drug dealers selling fentanyl in response to the opioid epidemic.

Miller’s personal assistant found him unresponsive at his home in Studio City, Calif., on Sept. 7, 2018. The artist had reportedly spent the previous night watching football with friends.

Singer Ariana Grande, who had dated Miller, and many other musicians have paid tribute to Miller since his death through social media posts and last year’s “Mac Miller: A Celebration of Life” concert, where Chance the Rapper, Travis Scott, John Mayer and others performed.

This story was originally published on Sept. 4, 2019 at 06:05 p.m. EST.

Read more from Yahoo Entertainment:

Want daily pop culture news delivered to your inbox? Sign up here for Yahoo Entertainment & Lifestyle’s newsletter.