When five giant mortgage firms signed a landmark $25-billion mortgage settlement last year, officials hailed debt forgiveness as the primary strategy to preserve homeownership.

The banks hoped to avoid further enforcement action over widespread foreclosure abuses; federal regulators and state attorneys general aimed to prevent even more foreclosures.

"This isn't just about punishing banks for their irresponsible behavior," Housing and Urban Development Secretary Shaun Donovan said. "It's also about requiring them … to help homeowners stay in their homes."

Advocates for borrowers took such comments to mean that the banks would prioritize debt write-downs on first mortgages, which banks resisted before the settlement. Now, with nearly all the promised relief handed out, it is clear that the banks had other ideas.

The vast majority of the aid to borrowers, it turns out, came in the form of short sales and forgiveness of second mortgages. Just 20% of the aid doled out under the national settlement went to forgiveness of first-mortgage principal, the kind of help most likely to keep troubled borrowers in their homes. In terms of borrowers helped, just 15% of the total received first-mortgage forgiveness.

The five banks collectively delivered twice as much aid using short sales, in which owners sell their homes for less than the amount owed and move out, with the shortfall forgiven.

In all, the lenders sought credit for nearly $21 billion related to short sales and $15 billion related to second mortgages. That compares with $10.4 billion in write-downs on first mortgages.

In California, Atty. Gen. Kamala D. Harris expressed a similar preference for debt forgiveness in announcing the settlement in February 2012.

"We insisted on homeowner relief for Californians," she said, "that will allow them to stay in their homes."

But the mortgage relief here followed the same pattern as nationally.

Harris negotiated separate commitments from the three biggest mortgage servicers — Bank of America Corp., Wells Fargo & Co. and JPMorgan Chase & Co. — and predicted that short sales would be a relatively small portion of the relief at $3.1 billion.

But a tally released Tuesday by UC Irvine law professor Katherine M. Porter, Harris' appointed monitor for the program, put the total at $9.24 billion.

That's roughly equal to the $9.2 billion in aid delivered through principal forgiveness. But more than half that total was applied to second mortgages, Porter said.

Just 84,102 California families had first- or second-mortgage debt forgiven, compared with the initial prediction from Harris' office that 250,000 borrowers would get such help.

Bank officials said the high volume of short sales in part reflected an enormous backlog of borrowers who, before the settlement was announced, already had failed to qualify for various loan modification programs. Other borrowers decided not to keep their homes, they said, for such reasons as divorce or a job offer in another city.

"The decision to pursue a short sale versus a retention option rests with the homeowner and not with the servicer," Wells Fargo said in a statement released by Tom Goyda, a bank mortgage spokesman.

Some foreclosure-prevention counselors and officials at advocacy groups nonetheless expressed disappointment that more first-mortgage debt was not eliminated.

"We all wish there had been more principal reduction, which is what is most helpful in keeping people in homes," said Kevin Stein, associate director of the California Reinvestment Coalition, a 300-member alliance that lobbies on behalf of low-income and minority neighborhoods.

Still, Stein said, the program set a good precedent, demonstrating that debt forgiveness can benefit lenders and borrowers alike without causing a wave of intentional defaults, as critics had warned.

Bruce Marks, founder of Neighborhood Assistance Corp. of America, a major housing counseling group, had a harsher assessment of the lack of aid to keep people in their homes.

"It just shows you that the banks are running the government," Marks said. "There's virtually no benefit to borrowers, and yet you give the banks credit for short sales and getting second liens wiped out — something they were going to have to do anyway."

The housing crash made second liens almost worthless in foreclosure sales. Second-mortgage holders don't get a dime until first mortgages are paid in full. With housing values deflated, that left banks unlikely ever to collect.

Government and banking officials say borrowers nonetheless benefit when second mortgages are wiped out, which removes a major blemish from credit reports and clears away a common obstacle to first-mortgage principal reduction or short sales. What's more, they said, forgiving second liens makes borrowers more likely to continue paying first mortgages because they believe that they can recover their home equity.

Bank of America alone has forgiven nearly $10 billion in second liens, winning praise from Porter, California's settlement monitor, and other observers. The BofA program automatically wiped out 150,000 underwater second mortgages that had gone delinquent unless the borrowers, for tax reasons, opted out.

More than a third of those customers had equity in the homes restored, BofA mortgage spokesman Rick Simon said, and more than half wound up with a loan-to-value ratio of less than 120%.

Simon said the bank doesn't know exactly how many of the borrowers retained their homes after their second mortgages were erased, or how many wound up in short sales or foreclosures.

Porter, national mortgage settlement monitor Joseph A. Smith Jr. and U.S. Department of Housing and Urban Development officials also said they had no idea how often wiping out a second mortgage led to home retention.

In any case, the banks appear to have fulfilled their pledges of relief, although that won't be official until Smith, a former North Carolina banking commissioner, has finished auditing the banks' reports, expected by year's end. His next report is due out by the end of this month.

scott.reckard@latimes.com

Twitter: @ScottReckard