New York City police have uncovered a $10 million oxycodone trafficking ring that stretched across several states. Wikipedia

A New York City doctor has been charged with operating a $10 million oxycodone trafficking ring that operated across several states, including Pennsylvania.

The investigation into the ring led to the largest prescription drug bust in the state’s history, authorities said Thursday.

The Associated Press reports that a total of 49 people were arrested in Tuesday’s raid, including two of the operation’s major leaders in Pennsylvania. The mass arrests were made possible by over a year of undercover work performed by New York City’s special narcotics unit.

During a hearing in Manhattan’s Supreme Court, Dr. Hector Castro of the city’s Itzamna Medical Center pleaded not guilty to 39 counts of criminal sale of a prescription for a controlled substance, AP reports.

Castro’s scheme was masked by laws that prevent New York’s state health department from keeping tabs on prescriptions that are filed in another state. In all, the disgraced doctor granted over 4,500 prescriptions that dispensed more than 500,000 pills from New Jersey-area pharmacies.

"A scheme to obtain prescriptions in one state, and fill them and distribute them in another, exposes weakness in our regulatory systems," read a statement by Special Narcotics Prosecutor Bridget Brennan.

The trafficking may have continued to go unnoticed were it not for a fatal 2011 overdose in Middlesex, N.J. The victim’s pill bottle bore Castro’s name, causing authorities to investigate his role in the incident.

Authorities also believe that Patricia Valera, Castro’s office manager, was culpable in her employer’s crimes. Together, they conspired to distribute pills in New York, New Jersey, and Pennsylvania, AP reports.

Forty-three of Tuesday's raid’s 49 arrests occurred in Pennsylvania, making it the largest prescription drug-related mass arrest in state history, authorities said. In a series of additional sting operations, police were also able to seize 30 guns.

AP also reports that Valera engaged in a separate scheme, in which she forged prescription sheets that she had stolen from Castro. Valera then sold the forged sheets to a pair of competing Pennsylvania trafficking rings.

Valera, a Bronx resident, pleaded not guilty to charges of conspiracy and criminal sale of a prescription for a controlled substance. She will have a bail hearing on April 11.

Meanwhile, Castro was held on $500,000 bond or $250,000 cash. He is also scheduled to appear in court on April 11.