NEWARK, N.J. - Four Russians and a Ukrainian were charged in what prosecutors called the largest hacking and data breach scheme in U.S. history.

The five conspired in a "worldwide scheme that targeted major corporate networks, stole more than 160 million credit-card numbers and resulted in hundreds of millions of dollars in losses," Paul Fishman, the U.S. attorney in New Jersey, said Thursday.

U.S. prosecutors in New York separately indicted one of the five men and another Russian in another hacking scheme that targeted 800,000 bank accounts. Two are in custody.

The five men operated "a prolific hacking organization" that "penetrated the secure computer networks of several of the largest payment-processing companies, retailers and financial institutions in the world," according to an indictment unsealed in federal court in Newark, N.J. They are accused of stealing user names and passwords, personal identification information, and credit- and debit-card numbers.

"This type of crime is the cutting edge," Fishman said. "Those who have the expertise and the inclination to break into our computer networks threaten our economic well-being, our privacy and our national security."

After stealing data, known as "dumps," the men sold it to "dumps resellers," who then sold it through online forums or to individuals and organizations, prosecutors charged.

The men encoded the data into the magnetic strips of blank plastic cards and withdrew money from automated teller machines and made credit-card purchases, the U.S. said.

The men conspired with Albert Gonzalez, a Miami hacker serving 20 years in prison, said the indictment.

Those indicted were Vladimir Drinkman, 32, of Moscow and Syktyvkar, Russia; Aleksandr Kalinin, 26, of St. Petersburg; Roman Kotov, 32, and Dmitriy Smilianets, 29, of Moscow; and Mikhail Rytikov, 26, of Odessa, Ukraine.

All five were charged with conspiracy to gain unauthorized access to computer and conspiracy to commit wire fraud.