Credit rating agency Moody’s has said it will pay out almost $864m to US states and federal authorities to settle allegations the firm’s credit ratings for residential mortgages contributed to the worst financial crisis since the 1930s.

The US Department of Justice said the settlement also contained a “factual admission” of the firm’s conduct.

The terms of the deal will see Moody’s pay a $437.5m fine to the Department of Justice, and the remaining $426.3m split between 21 US states and Washington DC.

In a statement, the Department of Justice said: “Moody’s failed to adhere to its own credit rating standards and fell short on its pledge of transparency in the run-up to the Great Recession.”

“Today’s settlement contains not only a significant penalty and factual admissions of its conduct, but also a commitment by Moody’s to new and continued compliance measures designed to ensure the integrity of credit ratings going forward.”

The statement added: “Investors relied on Moody’s credit ratings to be objective and independent, and they naturally expected Moody’s to follow its own published methods.”

“Our investigation revealed, and Moody’s has now acknowledged, that Moody’s used a more lenient standard than it had itself published.”

The settlement also included “non-monetary measures”, agreed on with the Department of Justice, designed to ensure the integrity of future credit ratings the firm issues. This includes a commitment to keep financial analysts out of commercial discussions and agreements.

In a statement, Moody’s said: “After careful consideration, Moody’s determined that the agreement, which removes significant legacy legal risk and avoids costs and uncertainty associated with continued investigations and litigations, is in the best interest of the company and its shareholders.

The company added: “Moody’s stands behind the integrity of its ratings, methodologies and processes, and the settlement contains no finding of any violation of law, nor any admission of liability.”

2008 Financial Market Crash Show all 6 1 /6 2008 Financial Market Crash 2008 Financial Market Crash 14 trillion dollars That’s how much the global financial crisis cost the US economy – equivalent to a full year’s GDP, according to a 2013 study by the Dallas Federal Reserve. AFP/Getty 2008 Financial Market Crash 12 billion pounds The deal that Lloyds TSB announced in September 2008 to take over Britain's biggest mortgage lender HBOS Getty Images 2008 Financial Market Crash 323 billion euros Greece's total debt, seven years after the financial crisis exposed its hidden borrowings and government overspending Rex 2008 Financial Market Crash 27 per cent The peak unemployment rate Spain hit in early 2013. It was around 8% in mid-2007 Getty 2008 Financial Market Crash 12 Billion Pounds The amount in pounds that RBS reported as losses in February 2009, the biggest in British corporate history. Getty Images 2008 Financial Market Crash 70 years Since we had another recovery this slow - and that was after the Second World War Rex