Over the past seven years, a New York City-based fraud ring allegedly stole more than $19 million worth of iPhones by posing as cellphone subscribers to get new devices at little or no cost. The six people authorities say ran the ring would then sell the stolen phones on the black market, getting away with the scam for years, according to a now-unsealed complaint originally filed by federal prosecutors at the end of April.

The defendants are charged with felony counts of mail fraud, conspiracy, and aggravated identity theft. Details of the previously unreported case are being published for the first time by Quartz.

The scheme’s victims included untold numbers of customers whose accounts were used by the ring, as well as the (unnamed) carriers themselves, which typically bore the losses. The crew’s operation was relatively simple, say court filings: Associates using fake IDs and counterfeit debit cards went to mobile phone stores and posed as the legitimate account holders, looking to upgrade to new phones on their existing accounts. They would spread payments out over many months, which would come as a surprise on the actual customer’s next bill. By then, the scammers—and the devices—were already long gone.

The ring visited retailers in 34 states, prosecutors allege. The filings do not specify how many phones the ring obtained or how many customer accounts were affected.

An unnamed “cooperating witness,” who is identified as “CW-1” in court documents, exposed the inner workings of the group to investigators. The operation was organized like a business, with workers comprising various levels within the organization. The leaders called themselves “Top Dogs,” and they, naturally, made most of the money. In the middle were those who actually stole people’s identities and created fake identity documents. At the bottom were the drivers and runners who went state-to-state on trips to procure iPhones and ship them back to the Bronx, one of the five boroughs that makes up New York City.

CW-1 said he had made approximately 18 trips for the crew, which paid him about $100 for each phone he was able to procure.

“On each trip, CW-1 would be accompanied by a driver,” the complaint says, which was signed by New York Police Department (NYPD) detective Armando Coutinho of the NYPD-FBI Joint Major Theft Task Force. “In advance of the trip, CW-1 would receive a fake ID and bank card. The bank card was to be used as a secondary form of identification in case CW-1 was questioned as to his identity…Every few days on these trips, CW-1 would send back to the New York area, via overnight delivery, the iPhones he had acquired on the trip and since the last shipment.”

But in December 2014, someone at an unnamed overnight shipping service the ring was using to ship the stolen iPhones back home became suspicious. This person noticed that a large number of packages were being sent from out-of-state to the same two shipping store locations in New York, never to an actual business or home address—however, all the parcels bore New York return addresses. The shipping company employee also saw a steady stream of packages leaving those same two store locations for destinations in other states—again, never to a person’s address.

Over time, the shipping company employee (presumably in partnership with law enforcement) opened 39 of these suspicious packages and discovered roughly 250 mobile phones inside of them, as well as dozens of fraudulent credit cards, driver’s licenses, and passport cards.

Meanwhile, two members of the ring were arrested on unrelated charges. When cops searched their phones and laptops, they found evidence linking them to the ring carrying out the iPhone scam.

This isn’t the first time scammers have targeted Apple and the iPhone. Last year, another Bronx-based crew with a nearly-identical scam, was busted by Homeland Security Investigations for allegedly stealing more than 1,300 iPhones worth more than $1 million. And earlier this year, Chinese students in Oregon were charged with fraud after trying to return hundreds of counterfeit iPhones to Apple in exchange for new, authentic Apple devices.

The defendants in the newly uncovered iPhone ring have pleaded not guilty and each is free on $100,000 bond, pending trial. The US Attorney’s Office declined to comment.

Read the full text of the charges here: