NEW YORK — Calling it perhaps the biggest money-laundering scheme in U.S. history, federal prosecutors charged seven people Tuesday with running what amounted to an online, underworld bank that handled $6 billion for drug dealers, child pornographers, identity thieves and other criminals around the globe.

The case was aimed at Liberty Reserve, a currency-transfer and payment-processing company based in Costa Rica that authorities say allowed customers to move money anonymously via the Internet with almost no questions asked.

U.S. officials said the enterprise was staggering in scope: Over roughly seven years, Liberty Reserve processed 55 million illicit transactions worldwide for 1 million users, including 200,000 in the U.S.

The network “became the bank of choice for the criminal underworld,” U.S. Attorney Preet Bharara said in announcing the unsealing of an indictment against the defendants, including Liberty Revenue founder Arthur Budovsky, an American who renounced his U.S. citizenship after deciding to set up in Costa Rica.

Unlimited Digital Access. $1 for 4 weeks.

Liberty Reserve allowed users to open accounts using fictitious names, including “Russian Hacker” and “Hacker Account.”

An undercover investigator was able to register using the name “Joe Bogus” and the address “123 Fake Main Street” in “Completely Made Up City, New York,” then conduct transactions he recorded as “ATM skimming network” and “for the cocaine.”

The network charged a 1 percent fee on transactions through middlemen known as exchangers, who converted real currency into virtual funds, then back into cash.

In the indictment, prosecutors called the network “one of the principal means by which cyber criminals around the world distribute, store and launder proceeds of their illegal activity … including credit-card fraud, identity theft, investment fraud, computer hacking, child pornography and narcotics trafficking.”

Budovsky and another defendant, identified as Azzeddine el Amine, were arrested Friday at a Madrid airport while trying to return to Costa Rica, according to a Spanish court official, who spoke on condition of anonymity because court policy forbids him from speaking on the record.

They were ordered jailed while they await a hearing on extradition to the U.S.

Two other men, including Liberty Reserve co-founder Vladimir Kats, were arrested last week in New York City.

There was no public record of their arraignments Friday night, and there was no immediate response to phone messages left Tuesday with their attorneys.

Of the three remaining defendants, one was in custody in Costa Rica and the others were at large there.

While authorities described Liberty Reserve as being rife with criminals, the site’s ease of use, low fees and irreversible transactions that deterred fraud also attracted legitimate users.

Mitchell Rossetti, whose Houston-based was one of several mainstream merchants that accepted Liberty Reserve’s online-only currency, said his business still had about $28,000 tied up in Liberty Reserve accounts.

“The irony of this is I went to them because of the security,” Rossetti said. “All sales were final.”