Federal prosecutors on Monday charged three JP Morgan Chase traders with manipulating the precious metals futures market in a scheme that cost investors tens of millions.

New York FBI official William F. Sweeney said the men accused in the eight-year scheme traded gold, silver, platinum and palladium in a way that hurt "the natural balance of supply-and-demand."

Michael Nowak, who led the precious metals trading desk at "Bank A" — an institution the Department of Justice has previously identified as JP Morgan — was arrested along with fellow traders Christopher Jordan and Gregg Smith.

The scheme is similar to those documented in "Flash Boys," a 2014 book by nonfiction author Michael Lewis. The book ignited a firestorm on Wall Street over the practices of high-speed trading and "spoofing," where traders try to send in fictitious buy orders.

The traders at the center of the case, announced Monday morning, are primarily charged with trying to place fictitious buy orders for future before attempting to sell them, gin up the appearance of interest in the commodities, and drive up the price.

Within a second of selling at the higher price, they would cancel their fake buy orders, duping the market into believing there was extra demand.

The traders, according to the indictment, also allegedly conducted the scheme in reverse whenever they needed to drive down the price, submitting fictitious sell orders.

"The defendants and others allegedly engaged in a massive, multiyear scheme to manipulate the market for precious metals futures contracts and defraud market participants," said Assistant Attorney General Brian A. Benczkowski.

"These charges should leave no doubt that the Department is committed to prosecuting those who undermine the investing public’s trust in the integrity of our commodities markets," he added.

In a statement, attorneys for Nowak said it was "truly regrettable that the DOJ decided to go forward with a prosecution" of their client, adding that Nowak "has done nothing wrong."

"We look forward to representing him at trial and expect him to be fully exonerated, said the attorneys, David Meister and Jocelyn Strauber.

Jamie MacDonald, who heads enforcement for the Commodity Futures Trading Commission said, the scheme "went unchecked for 8 years and involved thousands of transactions."

In a call with reporters Monday, Benczkowski said the Justice Department would continue to use data to develop cases, as they have with probes related to the opioid crisis.

"It is fair to say that the data we have in our possession, directed us towards the trading activity of these particular traders," Benczkowski said.

The indictment notes the scheme was not foolproof, with the traders sometimes not cancelling the orders fast enough.

Nowak, 45, Jordan, 47, and Smith, 55, were joined by traders John Edmonds, Christian Trunz and Corey Flaum, also of JP Morgan, who had already pleaded guilty in the case. Trunz has a cooperation agreement with federal prosecutors.

Smith, Trunz and Flaum came to JP Morgan by way of the defunct investment bank Bear Stearns as part of JP Morgan's buyout of the failed investment bank at the beginning of the 2008 financial crisis.