JPMorgan Chase on Tuesday agreed to pay more than $920 million as part of an agreement with three federal agencies to settle allegations that the firm’s traders manipulated the precious metals markets with false trades, an illegal practice called “spoofing.”

The fine is the largest ever imposed by the Commodity Futures Trading Commission (CFTC), which worked in conjunction with the Securities and Exchange Commission (SEC) and Department of Justice (DOJ). It includes $311.7 million for restitution to traders harmed by the spoofing scheme, disgorgement of $172 million in ill-gotten gains, and a civil monetary penalty of $436.4 million.

“Spoofing is illegal—pure and simple,” said CFTC Chairman Heath Tarbert in a press release. “This record-setting enforcement action demonstrates the CFTC’s commitment to being tough on those who intentionally break our rules, no matter who they are. Attempts to manipulate our markets won’t be tolerated. The CFTC will take all steps necessary to investigate and prosecute illegal activities that could ultimately undermine the integrity of the American free enterprise system.”

In addition, the SEC announced charges against broker-dealer subsidiary JPMorgan Securities (JPMS) for manipulative trading strategies involving Treasury cash securities over two years. The settled action included a civil penalty of $25 million and disgorgement of $10 million included in the $920 million total. Further, JPMorgan entered into a three-year deferred prosecution agreement with the DOJ, filed in U.S. District Court for the District of Connecticut, to settle two counts of wire fraud.

In its enforcement order, the CFTC was particularly critical of JPMorgan’s inability to stop the illegal activity through monitoring of trade and employee activity, as well as enforcement of compliance with the firm’s policies and procedures.

“During the Relevant Period, JPMS failed to identify, investigate, and stop the violative conduct,” the CFTC order said.

According to the order, numerous JPMorgan traders placed hundreds of thousands of spoof orders for precious metals from 2008 to 2016. The order designates 10 traders, including the heads of the precious metals and Treasury trading desks, involved in the scheme, in addition to two salesmen. As part of the scheme, JPMorgan traders would bid or offer trades on precious metals with the intent to cancel the bid or offer before execution, the CFTC said. The spoof orders would affect the precious metals market by increasing the value of genuine precious metal orders placed by JPMorgan.

The CFTC previously entered into formal cooperation agreements with former JPMorgan traders John Edmonds and Christian Trunz, who have each pled guilty in federal court to charges related to the scheme, according to the DOJ. The DOJ filed charges in 2019 against former JPMorgan traders Gregg Smith, Michael Nowak, and Christopher Jordan, as well as former salesperson Jeffrey Ruffo in U.S. District Court for the the Northern District of Illinois. Those charges are still pending.

The firm’s compliance department was faulted for lacking the ability to track spoofing trades prior to 2014.

Even after adding a new surveillance tool in the beginning of 2014, JPMorgan still failed to detect and stop the illegal conduct, the CFTC said. This was despite “numerous red flags” including internal surveillance alerts; inquiries about the spoofing from CME Group, which operated one of the precious metal trading platforms; and internal allegations of misconduct from a JPMorgan trader.

JPMorgan “failed to provide supervision to its employees sufficient to enable JPMS to identify, adequately investigate, and put a stop to JPM’s Precious Metals Desk and Treasuries Desk’s misconduct,” the CFTC order said. “Accordingly, JPMS failed to perform its supervisory duties diligently.”

The CFTC order noted that while JPMorgan’s initial responses to its inquiries about the spoofing were “unsatisfactory” and meant to mislead investigators, the company provided substantial assistance to investigators in the later stages of the investigation.

In addition to paying the fines, JPMorgan has agreed to implement remedial measures to stop future spoofing trades, including “hiring hundreds of new compliance officers, significantly increasing compliance and internal audit’s budget, and increasing its audit headcount,” according to the CFTC’s order. JPMorgan has also improved its anti-fraud and manipulation training and policies, revised and improved its surveillance programs, and implemented tools and processes to facilitate enhanced supervision of traders.

“The conduct of the individuals referenced in today’s resolutions is unacceptable and they are no longer with the firm,” said Daniel Pinto, co-President of JPMorgan Chase and CEO of the Corporate & Investment Bank, in a statement. “We appreciate that the considerable resources we’ve dedicated to internal controls was recognized by the DOJ, including enhancements to compliance policies, surveillance systems and training programs.”