Four dozen people were charged on Tuesday with cheating the government-run Medicaid health insurance plan for the poor out of millions of dollars through a scheme to resell expensive HIV medications and other drugs that program recipients had received at heavy discounts.

Medicaid recipients, some of them AIDS patients, would fill their prescriptions at little or no cost monthly and sell the drugs for cash to aggregators, according to documents unsealed in Manhattan federal court.

The aggregators then altered the drug containers to make them appear new and sell the medicines through a national underground market to unsuspecting pharmacists, who would buy them at discounts, the court papers said.

Some of the drugs illegally resold included HIV medications such as Gilead Sciences Inc and Bristol-Myers Squibb's Atripla, which Medicaid prices at $1,635 per bottle. Other drugs included asthma medication and pain killers.

Charges were brought against 48 people across the United States. FBI spokesman Peter Donald said that 35 people were in custody, including 16 in the New York area, 13 in Florida and two in Pennsylvania.

The charges included conspiracy to commit wire fraud, mail fraud and healthcare fraud, as well as conspiracy to commit money laundering and prescription drug fraud.

The Manhattan U.S. Attorney's office, which is prosecuting the case, said law enforcement authorities would hold a news conference on the charges later on Tuesday.

The cases are USA vs. Alex Oria et al and USA vs. Juan Viera et al, U.S. District Court, Southern District of New York, Nos. 12-mag-1854 and 11-cr-1072.