States are growing increasingly frustrated with banks foreclosing on homes; so much so that some states are threatening banks with legal action if they don’t mend their foreclosing ways. New York is leading the way — and other states have already begun to follow.

Here is the back story. A recent Supreme Court decision opened the door for state attorney generals to take legal action against mortgage lenders who issued exotic mortgages that were structured so it would be almost impossible to repay them, especially in a tough recession that’s crushed beleaguered homeowners.

Essentially, the court gave states the power that federal regulators didn’t have in holding banks accountable for marketing questionable mortgages. Usually, states are citing consumer fraud statutes when filing — or threatening to file — legal action against lenders.

The Supreme Court decision stems from a 2005 lawsuit by the New York State Attorney General’s office looking for more legal room to sue mortgage lenders for violating “fair lending’ laws. The State of Illinois was right behind New York, with the attorney general in that state filing a predatory lending civil suit against Wells Fargo (Stock Quote: WFC). Arizona is also reportedly taking legal action against mortgage lenders, looking to stem the tide of 7,000 monthly foreclosures, according to state records.

In a recent interview with The New York Times (Stock Quote: NYT), Arizona Attorney General Terry Goddard said the legal threat can be used a hammer to dissuade banks from not following through on promises to work with borrowers on delinquent mortgages. “We tried to use the tool to be persuasive with the banks,” Arizona’s attorney general, Terry Goddard, said in an interview. “But their waterfall of excuses, the abysmal numbers of modifications, tells us persuasion is not working.”