State lawmakers approve what would be the nation’s strongest legislation to help financially troubled borrowers stay in their homes. Gov. Jerry Brown is expected to sign them this week or next.

Sacramento – California lawmakers have passed legislation that would provide homeowners with some of the nation’s strongest protections from foreclosure and such aggressive bank practices as seizing a home while the owner is negotiating to lower mortgage payments.

After years of distress in the housing and mortgage markets, during which lenders seized nearly a million California houses, legislators Monday sent a pair of Assembly and Senate bills to Gov. Jerry Brown designed to help financially troubled borrowers stay in their homes.

The legislation would make California the first state to prohibit lenders from “dual tracking,” the practice of negotiating with clients to modify a mortgage so that payments become more affordable while simultaneously pursuing foreclosure. In such cases, homeowners can wind up being evicted even though they had been working with the bank to modify their loans.

The measures would outlaw so-called robo-signing — the improper or faulty processing of foreclosure documents— and would allow state agencies and private citizens to sue financial institutions, under limited conditions, for economic compensation and for additional civil damages of up to $50,000 if lenders willfully, intentionally or recklessly violate the law. No lawsuit could go forward if the bank or servicer first fixes the problem with documentation or procedures, according to the bills.

The legislation, SB 900 and AB 278, also would simplify dealings between homeowners and their banks or loan servicers by requiring that clients be given a single representative to work with, helping to prevent bureaucratic runarounds.

“This has been an incredibly long and tortuous process to get the kinds of basic protections that borrowers have long needed throughout this six-year crisis,” said Paul Leonard, California director of the Center for Responsible Lending in Oakland.

The banking and real estate industries opposed the foreclosure-prevention bills, calling them well-meaning but overly complicated and so legally ambiguous that they would spur frivolous lawsuits.

It is crucial that “we don’t give borrowers and enterprising attorneys an opportunity to delay foreclosures at will,” said Dustin Hobbs, a spokesman for the California Mortgage Bankers Assn.

Bankers also said the bills would increase real estate transaction costs, slow the housing recovery, tighten credit and lower home values.

Senate Minority Leader Bob Huff (R-Diamond Bar) on Monday called home foreclosure “a significant and life-changing problem for many Californians and many California communities.”

“But rather than find realistic and reasonable solutions to help those in need, Democrats are wielding a sledgehammer on our fragile housing market,” Huff said.

A two-house conference committee made a number of amendments in an effort to address some of the criticisms made by the banks.

Committee members narrowed the measures to apply only to modifications on primary, or “first-lien,” mortgages. The compromises also limited the protections to owner-occupied residential properties with four or fewer living units. Mortgage holders who bought property for investments and so-called strategic defaulters, who turn in keys and voluntarily go into foreclosure, aren’t covered by the proposed law.

On Monday, the Assembly voted 53-25 in favor of the pair of bills that came out of the conference committee; the Senate passed the bills on a 25-13 vote.

Brown, who hadn’t previously indicated whether he supported the bills, issued a statement Monday saying the legislation “establishes important consumer protections that are long overdue.” Gil Duran, Brown’s press secretary, said that the governor “is expected to sign” the bills this week or next and that they would take effect Jan. 1.

The bills are the most controversial part of a Homeowner Bill of Rights legislative package, sponsored by California Atty. Gen. Kamala D. Harris and written by 10 Democratic lawmakers, including the state Senate and Assembly leaders. The package is modeled on a multi-state, $25-billion settlement of a foreclosure lawsuit against five large banks; it would extend protections to more homeowners and would lock the provisions into state law.

“Passing these key elements of the Homeowner Bill of Rights represents a significant step forward for struggling homeowners,” Harris said. “These common-sense reforms will require banks to treat California homeowners more fairly and bring more transparency and accountability to their practices in our state. Responsible homeowners will have a better shot to keep their homes.”

The housing crisis has hammered California: Although mortgage delinquencies and home repossessions have eased, more than 362,000 California homes were in foreclosure or seriously delinquent as of March 31, Mortgage Bankers Assn. data show. About 30% of all California homes with mortgages would not be able to command a sales price high enough to pay off the mortgage, according to research firm CoreLogic.

If the bills had been law a few years ago, they would have saved many homeowners much time, anxiety and heartache, said Rose Gudiel, who knows the problems all too well. The state worker from La Puente ran into unexpected financial difficulties in 2009 and fell slightly behind on her mortgage payments.

For three years, Gudiel said, she tried to get a loan modification but couldn’t get a straight answer about her status. She received a foreclosure notice in early 2011 but refused to vacate her home. The bank granted new terms only after Gudiel, backed by activists with the Alliance of Californians for Community Empowerment, made the news by getting arrested during a protest.

Gudiel, 35, said she can afford to stay in her three-bedroom house, where she lives with her parents and brother, now that her monthly mortgage payment has dropped to $1,800 from $2,400.

She said she likes the legislation: “It’s a good thing, because at least you’re able to get an answer and don’t have to go through the extremes that I had to do.”

Some of the proposed rules that state lawmakers approved Monday are already finding their way to borrowers because of the national mortgage settlement and other agreements reached last year between banks and federal regulators.

Alberto Gutierrez of Panorama City, another homeowner and alliance activist, said he gave up in frustration trying to get a loan modification from his bank last year. But recently the bank assigned him an officer to handle his case.

“Within the last four months,” the 39-year-old Gutierrez said, “I have been able to make more headway than I did all of last year.”

Lifsher reported from Sacramento, and Lazo from Los Angeles.