Citing extensive abuses of troubled borrowers across Massachusetts, the state’s attorney general sued the nation’s five largest mortgage lenders on Thursday, seeking relief for consumers hurt by what she called unfair and deceptive business practices.

In addition to creating a new and significant legal headache for the banks named in the suit — Bank of America, JPMorgan Chase, Citigroup, Wells Fargo and GMAC Mortgage — the Massachusetts action diminishes the likelihood of a comprehensive settlement between the banks and federal and state officials to resolve foreclosure improprieties.