Attorney General Martha Coakley has reached a 36-million-dollar settlement with Barclays Bank.

The bank will pay to settle allegations that it backed predatory subprime mortgage loans. The mortgages were mostly in distressed cities such as New Bedford, Brockton, Springfield, Lawrence, and parts of Boston.

Much of the money will go to provide relief for the affected borrowers.