Goldman Sachs Group announced Thursday afternoon that it has reached an agreement in principle to resolve the ongoing investigation of the Residential Mortgage-Backed Securities Working Group of the U.S. Financial Fraud Enforcement Task Force (RMBS Working Group). Goldman Sachs will pay more than $5 billion to resolve a number of claims including from the NCUA for securities that were sold to corporate credit unions between 2005 and 2007.

Under the terms of the agreement, Goldman Sachs will pay a $2.385 billion civil monetary penalty, make $875 million in cash payments and provide $1.8 billion in consumer relief. There is no word yet on how much of the agreement will be paid out to the NCUA. Regulators still have to approve the deal before it becomes final.

Read Goldman Sachs’ official news release on the principle agreement or analysis on CNN’s website.