Credit-rating agency Moody’s Investors Service Inc. has agreed to pay $864 million to settle accusations, by investigators for the federal government and 21 states, that Moody's used  "unfair and deceptive business practices" to "misrepresent its independence and objectivity" and enable investment bankers to rip off public investment agencies by selling them poor-quality mortgage bonds leading up to the 2008 financial crisis.
The settlement includes $19.4 million for Pennsylvania public agencies, the attorney general's office says. 

"Residential mortgage-backed securities and collateralized debt obligations derive their value from the monthly payments consumers make on their mortgages," acting attorney general Bruce Beemer said in a statement announcing the settlement.

"Despite repeated statements emphasizing its independence and objectivity, Moody's allegedly allowed its analysis to be influenced by its desire to earn lucrative fees from its investment bank clients,"  especially during 2004-07.

The government accused Moody's of having "altered its process so that the Aaa rating represented a greater risk than Moody's disclosed to investors and consumers."

Also, investigators found "Moody's gave in to pressure from powerful larger banks and repeat customers that paid Moody's millions of dollars to rate these securities" with its top Aaa rating, so bankers could dump them on "pension plans and retirement plans."

Moody's agreed to detail what it did to give the bonds these inflated ratings, and promised not to do it again.
The Attorney General's office "plans to distribute approximately $19.4 million to the Pennsylvania Department of Treasury, the Public School Employees Retirement System (PSERS), the State Employees Retirement System (SERS) and the Pennsylvania Turnpike Commission."
The state raised just over $20 million in "a similar settlement reached in 2015 with Standard & Poor’s."