Massachusetts Attorney General Martha Coakley on Thursday sued five major banks, including Bank of America and JPMorgan Chase, for allegedly illegal foreclosure practices in the midst of nationwide settlement negotiations.

Coakley, a Democrat, said these banks cut corners in a rush to foreclose on homes, initiated closing on property without owning the mortgage and robo-signed documents.

The lawsuit also accused the banks of deceptively misleading homeowners into entering loan modification programs, but failing to follow through.

"This is first comprehensive lawsuit seeking to obtain accountability and real relief for the banks' role and their misconduct in the foreclosure crisis," Coakley said. In addition to Bank of America and JPMorgan, Coakley's suit hit Citi, Wells Fargo and GMAC. The Mortgage Electronic Registration System, an industry-created service that helps banks avoid registering mortgage transfers, was also named in the suit.

MERS and its parent MERSCORP have been targets of lawsuits like Coakley's. MERS is listed as a mortgagee in official county records, while lenders hold the debt that can be sold to investors. When the debt is sold, the transfer is recorded in MERS, which is inaccessible to the public.

"MERS... actually corrupted the public land recording system by not registering legal and proper transfers of ownership of property," Coakley said.

MERS spokeswoman Janis Smith said the allegations against the company rest on a statute that does not apply to its business model. Smith noted that MERS' business practices have been validated in state courts before.

Meanwhile, banks have been in settlement negotiations with 50-state attorneys general over the foreclosure practices in exchange for immunity from future litigation.

That immunity caused a revolt among more progressive attorneys general. New York's top lawyer Eric Schneiderman was kicked off an executive panel for opposing deal containing any immunity; California's Kamala Harris in September broke off from the multistate negotiations.

Coakley said she was optimistic when banks acknowledged their role in robo-signing foreclosure documents but was dismayed at their attempts to avoid liability for conduct in other areas of the mortgage crisis.

"I believe that the banks have failed to offer meaningful and enforceable relief to homeowners for their deceptive conduct and the scope of the harm they have caused," she said. "They have had more than a year to show that they have understood their role and the need to show their accountability for this economic mess, and they have failed to do so. That's why we are filing suit today."

The banks have promised to fight Coakley's suit. JPMorgan said it was disappointed that the Massachusetts attorney general strayed from negotiations, which could "bring immediate relief to Massachusetts borrowers rather than years of contested legal proceedings."