U.S. banking giant JP Morgan Chase will reportedly pay $13 billion to end federal and state investigations into mortgage-backed securities it sold before the financial crisis, marking the largest civil penalty ever levied onto a U.S. company and wiping out more than half of the bank's 2012 profits.

Multiple U.S. media reports over the weekend suggested that a deal had been struck last Friday between the bank and the U.S. Justice Department, bringing to an end to civil mortgage litigation against JP Morgan, whilst still leaving room for criminal prosecution.

Of the $13 billion settlement, around $9 billion is expected to cover fines or penalties, while $4 billion will go to consumer relief for struggling homeowners.

According to Bloomberg, executives pushed at JP Morgan pushed to reach a settlement with authorities after reporting nearly $9.2 billion in litigation charges so far.

JP Morgan's Chief Executive Officer Jamie Dimon is said to have personally discussed the deal with U.S. Attorney General Eric Holder after markets closed last Friday, hoping to end the mounting legal costs.

The settlement will not only cover a Justice Department inquiry into the bank's pre-financial crisis mortgage bonds, but also settle lawsuits from the Federal Housing Finance Agency, the National Credit Union Administration, the state of New York and others.

In its most recent earnings report released last week, JPMorgan said its total reserve for legal issues is now at $23 billion. Adding in the $5.7 billion in possible future expenses, and the $8 billion the bank has already paid, and its total potential exposure to the 2008 financial crisis and other issues climbs to about $36.7 billion, according to the bank.

The six biggest U.S. banks, led by JPMorgan and Bank of America Corp have piled up more than $100 billion in legal costs since the financial crisis, a figure that exceeds all of the dividends paid to shareholders in the past five years, Bloomberg data showed.

Nevertheless, Dimon insisted, during a meeting hosted by the Institute of International Finance last week, that his bank's rising legal and regulatory penalties did not mean that the company's bankers were "immoral."

"Some (of our penalties) are self-inflicted, which we've completely confessed to the whole world. Some are obviously industry-wide," he said. "And yes, we've had some mistakes. But honestly, you can never expect to have no mistakes. So, we've had more than our share."

Related: US "Too-Big-To-Fail" Banks Now Bigger Than Before Financial Crisis

Related: US Government To Sue S&P Over Pre-Subprime Crisis Ratings: Report

Some industry observers also highlighted that Dimon could have had a case against a lighter penalty from authorities in regards to the allegedly mismanaged mortgage securities.

This view is guided by the fact that senior government officials had urged executives at JPMorgan to save a failing Bear Stearns and Washington Mutual in 2008; and about 80 percent of losses on mortgage securities were attributed to these two former companies.

Dimon himself argued in a speech last year that he did government a favor by buying Bear Stearns and that on hindsight, he might not go through with it again because of how much the deal ultimately cost.

"There's no question that the government asked JPMorgan to buy Bear and WaMu, told Lawrence McDonald, a former Lehman Brothers trader, and now a strategist at Newedge, to the Financial Times. " The government essentially after the fact is doing some kind of evil thing here, changing the rules."

"In the next financial crisis, the JPMorgan of the future, the Jamie Dimon in 2020 or 2018, I think they say, 'this is your problem - I'm not going to put my balance sheet at risk'," he said.

Economy Watch