"I think a lot of it was unfair, but I am not going to go into the details," said JPMorgan's Jamie Dimon.Reuters

JPMorgan's chief executive Jamie Dimon hit back at the US government for a raft of 'unfair' fines related to the mortgage securities scandal that ended up costing the Wall Street giant billions of dollars in settlements.

Speaking at the World Economic Forum in Davos, Switzerland, Dimon said many government claims against the bank were unfair because the dealings took place at Bear Stearns and Washington Mutual, before JPM bought them during the financial crisis.

"I think a lot of it was unfair, but I am not going to go into the details," said Dimon.

"It would really hurt this company and that would have been criminal for me to subject our company to those kinds of issues," he added after saying that JPM had "two really bad options" in choosing to settle or fight the cases.

Dimon said it could have taken three or four years of legal wranglings with the government which in turn could lead to a worse outcome than its $13bn (£8bn, €9.6bn) settlement with regulators.

The $13bn Government Settlement

In November 2013, JPM pledged to pay the largest ever amount by a public company to settle lawsuits with regulators, after the bank admitted wrongdoing in selling poor-quality mortgage-backed securities to state-controlled firms.

JPM said it will pay the $13bn fine to the government, in order to settle claims that it misrepresented the quality of its mortgage assets in the lead up to the financial crisis.

The deal includes a $4bn relief package with US Department of Housing and Urban Development, and a $4bn settlement with the Federal Housing Finance Agency, which manages government mortgage financing companies Fannie Mae and Freddie Mac.

However, the US Department of Justice said that the settlement does not clear JPM or its employees from any possible criminal charges.

The settlement that ends a string of lawsuits against JP Morgan comes after several months of negotiations between the Justice Department and the bank. The Department of Housing and Urban Development and several US states also took part in the talks.

The parties reached a tentative agreement in mid-October.

The bank has recently been suffering from high costs related to a number of lawsuits. In October, JPMorgan set aside $23bn to cover litigation expenses.

The massive settlement followed only a month after JPM revealed that $9.2bn worth of legal expenses resulted in the US banking giant posting its first ever quarterly loss under Dimon.

The legal expenses, which worked out as $7.2bn (£4.5bn, €5.3bn) after taxes, include money JPM is setting aside for future settlements with authorities.

"While we expect our litigation costs should abate and normalise over time, they may continue to be volatile over the next several quarters," said Dimon in a statement at the time.