Goldman Sachs agreed to pay about $60m to settle a Massachusetts investigation into the packaging of mortgage securities at the root of the collapse of the U.S. housing market.

The agreement calls for the bank to pay about $50m to compensate homeowners and the rest to the state, Massachusetts Attorney General Martha Coakley said today at a news conference in Boston. The deal will also allow for some loan principal reductions. Goldman Sachs directly holds 714 Massachusetts mortgages, she said.

The bundling of the riskiest type of mortgages into securities turned the US housing slump into a global recession as foreclosures deflated bond values and toppled Wall Street firms such as Lehman Brothers Holdings Inc. The Massachusetts attorney general has investigated Fremont Investment & Loan, now defunct, and H&R Block, owner of Option One Mortgage Corp., for making the types of mortgages that Goldman securitised.

bloomberg.com