J.P. Morgan Chase (JPM) agreed to shell out a record $410 million in penalties and repayments to ratepayers on Tuesday, settling allegations the largest U.S. bank manipulated electricity markets in California and the Midwest.

The settlement with the Federal Energy Regulatory Commission removes at least one legal and regulatory headache that had been hovering above J.P. Morgan.

The $410 million price tag on the deal is below that of reports earlier this month of a settlement nearing $1 billion, but it still represents a record, according to records on FERC's website. 

Calling the case an "eye-opener" of him personally, FERC Commissioner Tony Clark said in a statement that the settlement "sends a strong signal that market manipulation is being taken seriously."

FERC accused a unit of the bank of market manipulation tied to its bidding activities in electricity markets in California and the Midwest from September 2010 through November 2012.

J.P. Morgan Ventures Energy Corporation admits the facts set forth in the settlement, but neither “admits nor denies the violations.”

"We are pleased to put this matter behind us," said a J.P. Morgan spokesperson.

A probe by the regulator found JPMVEC “engaged in 12 manipulative bidding strategies designed to make profits from power plants that were usually out of the money in the marketplace.”

In each bid, JPMVEC placed bids “designed to create artificial conditions that forced” electricity market operators to pay J.P. Morgan “outside the market at premium rates," FERC said.

FERC found JPMVEC knew the operators “received no benefit from making inflated payments,” thereby “defrauding” the operators.

As part of the settlement, JPMVEC agreed to waive claims for additional payments from the California Independent System Operator, which operates the California electricity market. J.P. Morgan also said it will conduct a comprehensive review by outside counsel of its policies and practices in the power business.

Under terms of the agreement, J.P. Morgan will pay a civil penalty of $285 million to the Treasury Department and disgorge $125 million in “unjust profits.” The first $124 million will go to ratepayers in the California market, with the remaining $1 million going to ratepayers in the Midcontinent Independent System Operator.

J.P. Morgan said the settlement won't have a material impact on earnings due to reserves that were previously set aside. 

"While in a settlement no one gets everything he or she may have wanted, this one meets the test of transparency, timeliness, significance and prudency," said Clark, the FERC commissioner. 

Shares of New York-based J.P. Morgan dipped 0.25% to $55.55 Tuesday morning, cutting their 2013 rally to 26.3%.

Follow Matt Egan on Twitter @MattMEgan5