JPMorgan Chase & Co. (NYSE:JPM), on Tuesday, agreed to pay $410 million in penalties stemming from the U.S. Federal Energy Regulatory Commission, or FERC’s, claims that the country’s largest bank rigged bidding activities in energy markets in California and the Midwest between 2010 and 2012.

JPMorgan will pay a civil penalty worth $285 million and return $125 million in “unjust profits,” most of which will go to the California Independent System Operator while the Midcontinent Independent System Operator will receive $1 million, according to a FERC statement released on Tuesday.

The bank will also relinquish its claim to $262 million worth of disputed payments from California’s grid operator, Bloomberg News reported, citing a statement from the state authority.

“We’re pleased to have this matter behind us,” Brian Marchiony, a spokesman for New York-based JPMorgan, told Bloomberg News.

FERC Commissioner Tony Clark, in a statement, termed the settlement “a historic one” and said that “it sends a strong signal that market manipulation is being taken seriously.”

However, the regulator’s unexpected decision to drop individual charges against the bank’s executives, mainly Blythe Masters, who it claimed had made “false and misleading statements under oath,” was called a huge victory for Masters, by the New York Times’ DealBook blog.

At the same time, the blog noted that JPMorgan will have to brace itself for bigger and costlier battles with other government regulators in the months to come -- notably, with the Federal Housing Finance Agency, or FHFA, which oversees Fannie Mae and Freddie Mac, and has accused JPMorgan, along with 17 other banks, of selling substandard mortgage securities to the government.

The current settlement's $285 million civil penalty will be the largest paid by any company to FERC, which, on July 16, slammed a record fine of $487.9 million on Barclays PLC (NYSE:BCS) and four of its former traders for allegedly manipulating energy markets between 2006 and 2008..

The Barclays penalty will be a record if the company agrees to pay it. However, the company has said it will "vigorously defend this matter.”