STUDIO CITY (CBSLA) – A Hollywood Hills man was arrested Wednesday on federal charges he sold rapper Mac Miller fentanyl-laced oxycodone pills just two days before Miller died of a drug overdose in September of last year at his Studio City home.

FILE — Mac Miller performs at the Camp Flog Gnaw Carnival at Exposition Park on October 28, 2017, in Los Angeles. (Getty Images)

READ MORE: Rams Fans Flood The Stands For First Ever Playoff Game At SoFi Stadium

Cameron James Pettit, 28, was taken into custody by agents with the Drug Enforcement Agency on one count of distribution of a controlled substance in connection with the Sept. 7, 2018 death of the 26-year-old Mac Miller, whose real name is Malcolm James McCormick.

“It appears that Mac Miller snorted this fentanyl concoction prior to his overdose death,” Thom Mrozek, of the United States Attorney’s Office, said.

Pettit made his initial federal court appearance Wednesday in downtown Los Angeles was not asked to enter a plea, but he was ordered detained without bail pending trial and was given an Oct. 11 arraignment date.

Cameron James Pettit, 28, made his first appearance in court Wednesday. (Credit: Bill Robles)

READ MORE: East Coast Storm Grounds Dozens Of Flights Out of LAX, John Wayne Airport On Monday

According to the Justice Department, Pettit had agreed to sell Miller 30 milligram oxycodone pills, cocaine and Xanax. However, instead of selling Miller real oxycodone pills, on the morning of Sept. 5, he delivered Miller counterfeit oxycodone pills which had been laced with fentanyl.

“These are pharmaceuticals that are manufactured primarily in Mexico by the Mexican drug cartels for 75 cents to $1.50 per pill and sold on the streets of Los Angeles for $20 or more per pill,” Kyle Mori, DEA special agent, said.

It’s unclear if Miller knew he had been sold pills containing fentanyl.

Two days later, Miller was found dead in his home in the 11600 block of West Valley Crest Drive. Miller died of an accidental overdose caused by a mix of fentanyl, cocaine and alcohol, according to the toxicology report from the L.A. County coroner’s office.

“Fentanyl disguised as a genuine pharmaceutical is a killer – which is being proven every day in America,” said U.S. Attorney Nick Hanna. “Drugs laced with cheap and potent fentanyl are increasingly common, and we owe it to the victims and their families to aggressively target the drug dealers that cause these overdose deaths.”

MORE NEWS: Families Mourn 3 Teens Killed In Pasadena Crash

Pettit sent a text message to a friend hours after Miller’s death which read, “Most likely I will die in jail,” according to the criminal affidavit.