JPMorgan Chase is among the firms targeted in the suit.

NEW YORK (CNNMoney) -- The Massachusetts attorney general sued some of the nation's biggest banks on Thursday, accusing them of "unlawful and deceptive conduct in the foreclosure process."

Attorney General Martha Coakley said in a statement that Bank of America (BAC, Fortune 500), Wells Fargo (WFC, Fortune 500), JPMorgan Chase (JPM, Fortune 500), Citi (C, Fortune 500) and GMAC Mortgage are targeted in the suit, as is Mortgage Electronic Registration System Inc. (MERS) and its parent company.

The statement described the state court lawsuit as "the nation's first comprehensive lawsuit against the five major national banks regarding the foreclosure crisis."

"The AG's lawsuit seeks accountability for the banks' unlawful and deceptive conduct in the foreclosure process, including unlawful foreclosures, false documentation and robo-signing ... and deceptive practices related to loan modifications," the statement said.

MERS runs a database created in the 1990s to digitize and centralize the paperwork surrounding the bundling and selling of the loans.

The Massachusetts suit alleges that the database was used by the big banks to transfer ownership of mortgage debt without paying government registration fees and properly recording the transactions. The system also concealed the identities of the holders of mortgage debt from borrowers, the suit claims.

MERSCORP, parent company for Mortgage Electronic Registration System Inc., said the Massachusetts complaint "hangs on ambiguous language" and "has no applicability to MERS' business model."

The banks, meanwhile, say negotiations they are conducting with a group of state attorneys general toward a settlement over their handling of foreclosures are a more promising means of resolving the issue than lawsuits.

Bank of America spokesman Lawrence Grayson said the firm believes "that collaborative resolution rather than continued litigation will most quickly heal the housing market and help drive economic recovery."

Chase echoed those comments, saying it was "disappointed" with the suit, as did GMAC Mortgage, which said it would "vigorously defend" its actions in court.

Citi said in a statement that it had not yet reviewed the lawsuit, but that the bank believes "we have operated appropriately in compliance with existing laws." Wells Fargo also denied the allegations, adding that the suit "will do little to help Massachusetts homeowners or the recovery of the housing economy" in the state.

Settlement talks fraying: Coakley told reporters Thursday that the suit had come about in part because settlement talks with the banks, which have dragged on for more than a year, appear unlikely to yield a fair result.

"It is over a year later, and I believe that the banks have failed to offer meaningful and enforceable relief to homeowners," she said. "They've had more than a year to show they've understood their role and the need to show accountability for this economic mess, and they've failed to do so."

Attorneys general from California, New York, Delaware and Nevada have also distanced themselves from the settlement talks and are pursuing their own investigations.

The talks are stalled at present, but have focused on a settlement in the range of $20-25 billion in total from the firms involved in exchange for release from liability for all conduct related to foreclosures, according to sources familiar with the matter. Of this total, roughly $10-15 billion would come in the form of credit for loan modifications.

Iowa Attorney General Thomas Miller, who is coordinating talks on behalf of the states, said in a statement Thursday that Coakley had pledged to "evaluate the joint state-federal settlement we're negotiating, which we hope to reach soon."

"We're optimistic that we'll settle on terms that will be in the interests of Massachusetts," he added.