Providing lawyers to tenants facing eviction would help curb these abuses and prevent families from being wrongly evicted. And it works. A recent randomized experiment in Quincy, Mass., involving 129 participants showed that two-thirds of tenants offered full representation avoided eviction, compared with one-third who were offered limited assistance like instructional clinics.

Yes, some victories came from raising technical objections, but many others came in cases that were not open and shut but would have been treated that way had tenants been forced to represent themselves.

Are some tenants freeloaders? Sure. But what about when a tenant withholds rent because the toilet hasn’t worked in three weeks? Or when a landlord serves you after noticing that you’re pregnant? The determining factor in many eviction proceedings — including those involving people who lose their jobs or fall ill — isn’t the merits of the case but whether tenants have someone on their side who understands the law.

The right to counsel in civil matters has been established around the world — not just in France and Sweden but also in Azerbaijan, India, Zambia and many other countries we like to think of as less progressive than we are.

And the price tag — a bundle, right? Not really. A program that ran from 2005 to 2008 in the South Bronx provided more than 1,300 families legal assistance and prevented eviction in 86 percent of cases. It cost around $450,000, but saved New York City more than $700,000 in estimated shelter costs.

The key point is that when we direct aid upstream in the form of a few hours of legal services we can lower costs downstream. We all pay when the state reacts to the many consequences of eviction by distributing public assistance, subsidizing health care or providing a lawyer to someone who hustled in the drug or sex trade to survive life on the street.

But this policy’s worth should not be determined by the amount of money it saves. There are moral costs we incur as a society when our citizens are denied equal protection under the law and wrongfully thrown from their homes by court order. Countless families are living perilously close to eviction and homelessness. The least we can do is give them a fighting chance to stay put.