In a record-making settlement, JPMorgan Chase & Co. has agreed to pay $410 million to put to bed allegations that it manipulated power markets.

The U.S. Federal Energy Regulatory Commission (FERC) said in an order on Tuesday that the bank pledged to cough up $285 million in civil penalties and return $125 million in profits to electricity ratepayers in the Midwest and California, whose bills shot up from 2010 to 2012 thanks to JPMorgan's alleged interference. The settlement is the highest ever since 2005, when Congress granted FERC extra powers to police the energy markets. The bank also agreed to stop trying to collect $262 million in disputed payments from California's grid operator.

“JPMorgan's brazen, Enron-style market manipulation cost California ratepayers over $120 million,” Representative Henry Waxman (D-Calif.) told Bloomberg. According to FERC, a JPMorgan energy trading unit used 12 different bidding strategies in wholesale energy markets, causing grid operators to overpay by tens of millions of dollars.

A JPMorgan spokesperson told Bloomberg that the company was happy to put the matter behind it.

Read more InsideCounsel coverage of banks: