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.

Also named as a defendant in the Massachusetts suit was the electronic mortgage registry known as MERS, an entity set up by lenders to speed property transfers by circumventing local land recording officials.

The attorney general, Martha Coakley, and her investigators contend that the banks improperly foreclosed on troubled borrowers by relying on fraudulent legal documentation or by failing to modify loans for homeowners after promising to do so. The suit also contends that the banks’ use of MERS “corrupted” the state’s public land recording system by not registering legal transfers properly.