One case involved Sunny D. Eng, a former manager of computer systems on Wall Street. He and his wife, who has cancer, stopped paying the mortgage on their Holtsville, N.Y., home after Mr. Eng’s Internet services business foundered. The mortgage was originally held by the HTFC Corporation, but the foreclosure notice came from Wells Fargo, a bank that the Engs had no relationship with. They hired an experienced foreclosure defense lawyer on Long Island, Craig Robins. The court ultimately ruled in favor of Mr. Eng.

“You want to call it God, you can call it God,” Mr. Eng said. “You want to call it luck, you can call it luck. We just followed the system, and thank God the system worked.”

Through a spokesman, Mr. Baum said, “The foreclosure process in New York State is extremely complex and subject to extensive judicial review. We believe this review respects the due process of anyone who challenges a foreclosure. Consumer activists and attorneys representing homeowners have their own agenda in this process, including degrading the legal work we conduct on behalf of our clients by using terms like ’foreclosure mill,’ which I find personally and professionally insulting.”

He added, “What is important now is that all parties attempt to work together to resolve issues amicably. The barrage of accusations and litigation does little to help the underlying problems.”

Cases across the nation like Mr. Eng’s have led New York’s judicial system to take a hard look at the 80,000 pending foreclosures in the state and demand that the paperwork be sound, said the state’s chief judge, Jonathan Lippman. “Knowing what we know, our only option  at least from my perspective  is to turn to the lawyers who are officers of the court and say, ’You’d better go to your clients and find out if these cases are real,’ ” he said.

The court devised a two-page affirmation to be signed by lawyers in foreclosure actions saying they had reviewed the documents and had “confirmed the factual accuracy” of any allegations with the clients.

Ann Pfau, deputy chief administrative judge for New York State, who has worked directly with the state bar to carry out the plan, said, “We need to know that this is a court process that has some integrity.”