Those desperately trying to save their homes from foreclosure had to be relieved when they heard that Attorney General Eric T. Schneiderman is taking on HSBC Bank USA and its Depew mortgage operations facility.

Schneiderman filed legal action in State Supreme Court in Erie County accusing HSBC of ignoring a state law designed to get homeowners and banks into settlement talks to resolve foreclosure cases. In other words, the bank’s alleged inaction headed off attempts by homeowners to hang on to their homes.

The lawsuit against HSBC is just the latest effort by Schneiderman to fight abuse in the mortgage industry. He has made it his mission to protect homeowners from giant lenders who defy the law.

Schneiderman said his office’s lawyers and investigators looked at only a sampling of HSBC filings in county clerks offices in four counties – Erie, Monroe, Suffolk and the Bronx – and found “almost 300 examples” in which HSBC failed to file requests for judicial intervention. An RJI sets in motion settlement talks between the bank and homeowner aimed at resolving the foreclosure.

Two-thirds of the cases uncovered by Schneiderman involved homeowners in Erie County.

The attorney general’s office said foreclosure cases sat idle, without the bank requesting judicial intervention, for lengths of time that stretched, in nine instances, more than 900 days.

State law requires lenders to file an RJI when they sue a homeowner and to notify the county clerk of the legal action. This is then supposed to lead to a settlement conference within 60 days. The point is to keep people in their homes whenever possible, not leave them in limbo with little or no recourse.

Schneiderman said some victims are trapped in a legal “shadow docket” in which a lender has begun foreclosure proceedings without going through the process, denying homeowners the right to fight for their homes. An Office of Court Administration report last year found 25,000 New York State homeowners were in such a shadow docket.

The attorney general’s lawsuit seeks 10 separate orders of relief and includes asking a judge to force HSBC to follow the state notification law and to waive all additional interest and other charges levied on homeowners who weren’t notified of their settlement rights.

Those affected will have to wait for HSBC to act, which is something they’ve unfortunately grown accustomed to doing. In this case, though, the wait may bring relief instead of more pain.

The lawsuit against HSBC is about much more than one bank. Schneiderman says other banks are doing it, and his lawsuit is a warning that if they don’t change their practices they’ll be sued also.

Knowing the attorney general, those banks should take careful note of that warning.