Late last week, for example, JPMorgan lost a round in one of these battles when Jed S. Rakoff, a federal judge in Manhattan, rejected the bank’s request to dismiss a complaint brought by Dexia, a Belgian-French bank. The European bank had bought $1.6 billion in mortgage securities issued by Bear Stearns and Washington Mutual, another institution taken over by JPMorgan during the credit crisis.

Nevertheless, some lawyers who are battling the large banks and investment firms on behalf of mortgage investors said they welcomed the action by the task force. Gerald H. Silk, a lawyer at Bernstein Litowitz Berger & Grossmann in New York, said: “The government’s action represents a complete validation of the cases brought by investors who were duped by the fraudulent sale of mortgage-backed securities by JPMorgan, WaMu and Bear Stearns.”

The suit encompasses work begun by Mr. Schneiderman’s office in the spring of 2011, according to people briefed on the investigation. The attorney general subpoenaed documents from JPMorgan Chase and from large mortgage insurers that had also brought cases against the banks for failing to live up to their promises about the types and quality of mortgages placed in loan pools and sold.

New York investigators also capitalized on a cooperation agreement struck by Andrew M. Cuomo, the previous attorney general, with Clayton Holdings, a major firm in the business of evaluating mortgages. The firm provided documents and e-mails showing that Bear Stearns routinely ignored major defects on loans it was purchasing and pooling so that it could preserve its relationship with mortgage originators.

After the mortgage fraud task force was created in early 2012, Mr. Schneiderman’s office combined its efforts with the Housing and Urban Development Department, the S.E.C., the inspector general of the Federal Housing Finance Agency, the Federal Bureau of Investigation and the Justice Department.

The lawsuit’s filing, just days before the first presidential debate and a little over a month before the election, may be a way for the Obama administration to try to convince voters that it is working to hold mortgage miscreants accountable for wrongdoing. But, lawyers say, filing a case is not the hard part; winning it is.