Distressed homeowners who, with their lender’s approval, arrange a short sale of their property — for less than they owe — can’t be sued for the balance of their debt, the state Supreme Court ruled Thursday.

The unanimous decision protects borrowers who increasingly resorted to short sales as property values fell at the end of the last decade. The Legislature amended state law in 2012 to provide them explicit protection against deficiency judgments, but a lawyer for the borrower in Thursday’s case said that about 200,000 Californians had conducted short sales in the previous five years and were potentially affected by the ruling.

“The little guy won today,” said the attorney, Andrew Stilwell.

MBA BY THE BAY: See how an MBA could change your life with SFGATE's interactive directory of Bay Area programs.

His client, Carol Coker, borrowed $452,000 in 2004 to buy a condominium in San Diego County. She fell behind on her payments, and in March 2010 JPMorgan Chase Bank, which then held the loan, sent her a default notice and began foreclosure proceedings.

The bank then agreed to allow Coker to sell the condo to another buyer for $400,000, collect the proceedings and release its lien on the property. But after the sale, the bank billed her for the $116,000 balance due on her loan.

The state law at the time, originally enacted in 1933 and amended in 1989, prohibited a bank from seeking a deficiency judgment, for the balance due on its loan, after the bank itself foreclosed on a home. But the law did not address short sales, which were rare until the late 2000s, and JPMorgan Chase argued that the antideficiency rule did not apply to those cases.

But the court said the rationale of the law applied equally to short sales.

“For more than half a century, this court has understood the statute to limit a lender’s recovery on a standard purchase-money loan to the value of the security,” Justice Goodwin Liu said in the 7-0 decision.

Liu said the law was intended to maintain economic stability and protect property buyers from severe losses during periods of economic decline.

Coker’s short sale of the condo — which she bought as a residence, rather than an investment — “did not change the standard purchase-money character of her loan,” Liu said. He said the short sale, “like a foreclosure sale, allowed Chase to realize and exhaust its security” in the property.

Stilwell said the ruling would also affect cases in federal Bankruptcy Courts in California, which rely on state laws affecting creditors and debtors.

“The Supreme Court shut the door on banks trying to go too far to take advantage of the poor, the middle class, people who couldn’t afford what they got into in this real estate debacle,” he said.

The bank’s lawyers referred inquiries to bank headquarters in New York, which could not be reached for comment late Thursday.

The case is Coker vs. JPMorgan Chase, S213137. The ruling can be viewed here: www.courts.ca.gov/opinions/documents/S213137.PDF.

Bob Egelko is a San Francisco Chronicle staff writer. E-mail: begelko@sfchronicle.com Twitter: @egelko