JPMorgan Chase has agreed to pay more than $920 million to settle investigations with multiple federal agencies after admitting to a multiyear scheme to manipulate market prices through illegal trading practices.

The settlement, the largest ever imposed for this type of fraudulent activity, known as spoofing, resolves investigations by the Justice Department, the Securities and Exchange Commission and the Commodity Futures Trading Commission, according to statements from the government agencies Tuesday.

For years, JPMorgan traders initiated orders to buy or sell precious metals, Treasury notes and Treasury futures only to quickly cancel the trades before they were executed. The illegal practice sends a false signal to other market players, prompting price changes that the spoofers can then exploit.

According to the CFTC, traders at JPMorgan, in many instances, were successful in causing artificial price changes that were favorable to them.

“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 chief executive of its Corporate & Investment Bank. “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.”

The efforts to distort the market lasted more than eight years, from at least 2008 to 2016, the government agencies said.

“Spoofing is illegal — pure and simple,” CFTC Chair Heath Tarbert said in a statement. “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."

The settlement with the CFTC found that JPMorgan’s illegal trading “significantly benefited” the company while harming other market participants. JPMorgan, which admitted wrongdoing, is required to pay $920.2 million, including $311 million in restitution, $172 million in disgorgement and $436 million in civil monetary penalties, under the deal.

To resolve criminal charges tied to the unlawful trading in the precious metals markets and in Treasury futures, JPMorgan entered into a deferred prosecution agreement with the Justice Department. The bank is required to self-report violations of federal anti-fraud laws and cooperate in any future criminal investigations, U.S. Attorney John Durham of the District of Connecticut said in a statement.

In a parallel settlement, JPMorgan admitted to fraudulently manipulating Treasury securities, according to the SEC, agreeing to give up $10 million in profit and pay a civil penalty of $25 million to resolve the matter. The spoofing conducted by workers on JPMorgan’s Treasurys trading desk occurred between April 2015 and January 2016.

JPMorgan is scheduled to announce quarterly earnings Oct. 13. Shares dropped by less than 1 percent during afternoon trading. But all three major indexes gave up ground Tuesday. The company’s decrease for the day was roughly in line with declines in the financial sector overall.