Meanwhile, a separate settlement with the US Justice Department is expected to be announced soon.
“This is a significant step to address outstanding mortgage-related issues,” the FHFA said in a statement.
It is the biggest settlement ever by a US bank.
In a statement, JP Morgan said the settlement resolves the biggest case against the firm relating to mortgage-backed securities.
JP Morgan added that the agreement relates to “approximately $33.8 billion of securities purchased by Fannie Mae and Freddie Mac from JP Morgan, Bear Stearns and Washington Mutual” from 2005 – 2007.
The bank purchased Bear Stearns and Washington Mutual at the height of the financial crisis of 2008-2009, and has tried to argue that it should not be punished for mistakes made before those deals.
As part of the agreement with the FHFA, JP Morgan will pay $4 billion to Fannie Mae and Freddie Mac to settle claims that it violated US securities law.
It will pay the agencies an additional $1.1 billion for misrepresenting the quality of single-family mortgages.
Fannie Mae and Freddie Mac are the biggest mortgage lenders in the US. They received $187 billion in US taxpayer aid to help them stay afloat during the financial collapse.
They have since repaid $146 billion of the loan.
JP Morgan has been under investigation for several months by US regulators.
The bank said that it hoped the settlement would be part of a “broader resolution” of the firm’s housing bubble woes – a nod to an expected settlement with the US Justice Department that is also likely to run to several billions of dollars.
The firm reported a rare loss last quarter, having set aside an additional $9 billion to help it deal with its mounting legal troubles.
JP Morgan has set aside a total of $23 billion to help the bank work through its many investigations by regulators in the US and abroad.
Last month, JP Morgan agreed to pay more than $1 billion to help it end various investigations into its 2012 “London whale” trading debacle, which cost the bank more than $6 billion and raised questions about its oversight procedures.
1CKP0nB_8QYThe US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…