AT LONG LAST, federal and state authorities have reached an out-of-court settlement with five leading mortgage lenders, a major step in resolving the furor over “robo-signing” and other dubious foreclosure practices that came to light in October 2010. Bank of America, JPMorgan Chase, Wells Fargo, Citigroup and Ally Financial will pony up $26 billion in return for a measure of legal immunity; the figure could grow to $30 billion if an additional nine banks join the deal. The Obama administration and state attorneys general said the deal would salve an ailing housing market and deliver justice to “victim borrowers,” as U.S. Attorney General Eric H. Holder Jr. put it.

Actually, it’s rough justice — very rough — in a case of rampant, but essentially victimless, alleged law-breaking. Yes, lenders cut multiple legal corners as they coped with an unprecedented volume of delinquent loans; but few, if any, homeowners lost their homes as a result. It’s surely appropriate to hold banks accountable for alleged dishonesty, but it’s far from clear why the deal includes $1.5 billion for 750,000 people foreclosed upon between Jan. 1, 2008 and Dec. 31, 2011, without particular evidence that they were “victims” of robo-signing or anything else. That’s about $2,000 each, a windfall for which neighbors who rented, or borrowed only what they could afford, will not be eligible.

Meanwhile, the deal calls for $17 billion in principal relief for distressed homeowners over the next three years, with incentives to grant that relief in the first year. Of course, $17 billion is nice for the million or so people who will get a share of it, but it’s a drop in the $700 billion national ocean of negative equity. Banks may meet a substantial minority of the target through short sales, in which the lender signs off even though the proceeds are less than the remaining debt. In other words, banks will get credit for something they’re already doing; short sales represent 18.2 percent of home purchases in 2011, according to the Campbell/Inside Mortgage Finance HousingPulse survey.

In at least two ways, however, the settlement represents a genuine achievement. The state and federal authorities extracted reforms that could make for fairer and more transparent processes in the future. Notably, the deal restricts so-called “dual tracking,” in which banks offer a loan modification to homeowners while simultaneously pursuing foreclosure against them.

An additional, if ironic, benefit of the deal is that lifting the legal cloud over the banks will help them resume unavoidable foreclosures — a precondition for normality in the housing market. Washington, the states and individuals can still pursue criminal cases or try to sue the banks for securities-law violations, but how many cases would stand up in court is anyone’s guess. Certainly the potential for such litigation was not worth weeks of delays to appease the attorneys general who demanded authority to sue, most prominently Kamala Harris of California and Eric Schneiderman of New York.

In short, this quasi-punishment fits the quasi-crime — more or less. Maybe now everyone can get on with the real business at hand: rebuilding a system of housing finance whose erstwhile pillars, Fannie Mae, Freddie Mac and the “private-label” securities market, still lie in ruins.