Just a year ago, a common tragic story was unfolding in courtrooms throughout California, including Kern County.

Husbands and wives were fighting back tears as they begged judges not to evict them from foreclosed homes that had been sold at auction. These couples would explain that they had been negotiating with their lenders to modify their loans, when out of the blue came their eviction notices.It seems while one representative of the lender was negotiating the loan modification, another was proceeding with the foreclosure process, which culminated in the home's sale, a common maneuver called "dual-tracking."

And to make matters worse, homeowners would complain that communicating with their lenders was a nightmare. Every call they made was answered by a different person. Loan modification applications seemed to mysteriously disappear.

Clearly the stack was loaded against consumers as the real estate market melted down in the Great Recession, especially between 2008 and 2011, before California's Homeowners Bill of Rights became effective in January this year. The Homeowners Bill of Rights was pushed through the Legislature last year by state Attorney General Kamala Harris and consumer-oriented lawmakers. This month, the chief economist for the California Association of Realtors reported that the tables have been turned. The result of the Homeowners Bill of Rights, plus an overall improvement in the real estate market, has been a drastic reduction in the sales of bank-owned homes.

"In the beginning of 2009, 60 percent of the closings in our state were REOs (repossessed homes.) Now it's around 5 percent of total sales," economist Leslie Appleton-Young said in a conference call with news reporters and industry observers.

And the tragic court stories of consumers who have been hoodwinked by a biased lending system seem to be few and far between these days.

That does not mean consumers now enjoy 100 percent protection. Regrettably, there are still many disreputable lenders. And many consumers have never heard of the Homeowner Bill of Rights, so they do not invoke its protections. But the law seems to be working and lenders that ignore its clout do so at considerable risks.

In a nutshell, here is what the Homeowner Bill of Rights does:

* Bans "dual tracking." When a homeowner completes an application for a loan modification, the foreclosure process is basically put on hold until the application is reviewed.

* Single point of contact. A single person or team at the bank must be designated for the borrower to contact.

* Robo-signing penalties. Reports of lenders signing foreclosure documents without reviewing their accuracy were rampant. Now a civil penalty of up to $7,500 per loan can be imposed for such conduct.

* Tenant rights. Purchasers of foreclosed homes are required to give former owners at least a 90-day notice before starting eviction proceedings. Under some circumstances, a tenant with a lease can remain until the lease is up.

* Statute of limitations. Prosecutors now have three years to file criminal cases involving mortgage fraud. The deadline had been one year.

* Right to sue. Homeowners may sue a lender or servicer for violating the California Homeowners Bill of Rights.

Consider the case this summer of a Southern California house painter, whose business suffered in the Great Recession. The man was in the process of modifying his home loan with a national bank, when he received a notice that his home was scheduled for foreclosure auction. The house painter explained his situation to a customer, who was an attorney. The attorney obtained a temporary restraining order, which blocked the auction sale. The court battle required an attorney's appearance for both the restraining order and injunction. Legal research and document preparation also were needed. If the attorney had to show up on the courthouse steps to prevent the sale, the combined fees and costs could have escalated to $20,000 to $30,000. All of this is a big risk for unscrupulous lenders!

Obeying this new law and working with homeowners to modify their loans makes financial and legal sense. Borrowers have new legal power, and they should use it.

Steve Karcher is a Bakersfield attorney who focuses on real estate law.