Code Violations and Foreclosure: When Property Problems Keep Getting More Expensive in Southern California

By Damian Gerry · September 28, 2026 · 50 views

Deferred maintenance and a missed mortgage payment often show up on the same address, and a city does not wait for the foreclosure to finish before it acts on the other one. Here is how an unresolved code violation in Riverside, Orange, or San Diego County becomes a lien, and what that lien actually outranks.

In this article

A code violation does not sell itself when the house does, and in Riverside, Orange, and San Diego County it does not simply disappear if the property goes to foreclosure either. A city or county can turn the cost of fixing a nuisance into a lien on the property itself, and that lien can outrank a mortgage recorded before it. The table is what actually happens, in order.

StepWhat the city or county can doWhere it is written
Initial violationIssue a notice, generally with at least 30 days to abate, less if there is an immediate health and safety threatHealth and Safety Code 17980
Not correctedOrder repair, rehabilitation, vacation, or demolitionHealth and Safety Code 17980
Owner does not pay for the workRecord a nuisance abatement lien for the costGovernment Code 38773.1
Once recordedThe lien has the force, effect, and priority of a judgment lienGovernment Code 38773.1
Alternative to a lienAdd the cost as a special assessment collected with the property taxesGovernment Code 38773.5
The exterior corner of an older stucco home showing an honestly weathered roofline and a slightly overgrown side yard, warm late afternoon light, mature tree casting shade, Riverside CA
An honest, lived-in house, not a wreck, and a city that measures the difference in days.

The word that matters is priority. A nuisance abatement lien recorded under section 38773.1 takes the priority of a judgment lien from its recording date forward, which can put it ahead of liens recorded later and complicates a title search regardless of when the underlying mortgage was recorded. It is a second, independent claim against the property, on top of whatever a lender is already owed.

None of this requires the house to be in foreclosure first. Deferred maintenance draws code enforcement attention on its own, and a house already behind on the mortgage is disproportionately likely to also be behind on repairs, which is how the two problems end up compounding on the same address.

How a violation becomes a lien

Health and Safety Code 17980 gives the local enforcement agency authority to require repair, rehabilitation, vacation, or demolition of a substandard building, generally after 30 days notice to abate, shorter if the condition threatens health and safety immediately. If the owner does not act, the city can do the work itself and recover the cost. Government Code 38773.1 lets a city record that cost as a nuisance abatement lien, and 38773.5 lets it instead be collected as a special assessment on the tax roll, which is why some code violation debts show up on a title report and others show up on a tax bill.

"...shall have the force, effect, and priority of a judgment lien."

California Government Code § 38773.1, on a recorded nuisance abatement lien

A close view of an overgrown side yard corner against a stucco wall, dry grass and scattered leaves, late golden light, Southern California
A small problem, allowed to grow into a lien.
What triggers a code enforcement case
Common triggerWhy it draws attention
Overgrown vegetation, dead landscaping, accumulated debrisVisible from the street; frequently the first complaint filed by a neighbor
An unsecured pool or spaA safety hazard the Building Code treats as urgent, sometimes with a shorter abatement window
Structural damage, a leaking roof, exposed wiringFalls squarely under the substandard building definition in Health and Safety Code 17920.3
Unpermitted construction discovered during a saleA title or inspection issue that can stall or kill a traditional listing
Vacancy itself, in cities with an abandoned property ordinanceCovered separately in our guide to vacant homes in pre-foreclosure

Why this compounds a foreclosure instead of pausing it

Nothing about a code enforcement case slows Civil Code 2924's timeline, and nothing about a recorded Notice of Default slows a city's enforcement case either. They run independently, and each one adds a bill the other does not track. A house that reaches the trustee's sale carrying both an unpaid mortgage and a recorded nuisance lien sells for less at auction, because Civil Code 2924k pays every prior lien before the trustor sees a dollar of surplus, and a judgment-priority nuisance lien is one more claim standing ahead of you in that line.

Fix it, sell it as is, or let the lien attach: what each costs
RouteWhat it takesWhat it avoids
Correct the violation yourselfThe repair cost, on your own timeline, before the city's deadlineThe lien, and the city doing the work at its own contractor's price
Sell as is, disclosing the violationA buyer willing to take on the repair, usually at a discounted price reflecting itSpending money on a house you are leaving, and the risk of missing the abatement deadline
Do nothingNothing, until the city actsNothing. A lien with judgment priority, plus the underlying violation, both now attached to title

Selling a house with open violations

A cash sale can close around a code enforcement case that would stall a financed buyer's underwriting, because there is no appraisal or lender inspection requiring the repair first. We buy houses as-is for cash across Southern California, from the Temecula Valley and Riverside County to Orange County and North County San Diego, in the condition they are actually in, violations included. Get a no-obligation cash offer and compare it against the repair estimate and the abatement deadline.

Frequently Asked Questions

Which office handles code enforcement in Riverside, Orange, or San Diego County?

It depends on whether the property sits in an incorporated city or unincorporated county territory. A house in Temecula, Murrieta, Irvine, or Oceanside is enforced by that city's own code enforcement or building and safety department. A house in unincorporated Riverside, Orange, or San Diego County territory is enforced by the county's code enforcement department instead, which is also the office that would record a nuisance abatement lien under Government Code 38773.1 against the parcel.

Does a code violation lien outrank my mortgage?

It can. Government Code 38773.1 gives a recorded nuisance abatement lien the force, effect, and priority of a judgment lien as of its recording date, which is a different priority scheme than a mortgage recorded earlier automatically defeating it. A title company can tell you exactly how a specific lien sits against a specific mortgage, but the statute does not simply subordinate the lien to an earlier deed of trust.

How much notice does the city have to give before ordering repairs?

Health and Safety Code 17980 generally requires 30 days notice to abate a violation, though the enforcement agency can shorten that when the condition presents an immediate threat to health and safety. Before ordering a building vacated, the agency also has to provide tenants copies of the violation notice and its repair or demolition decision.

Can I sell the house before the lien is fully resolved?

Yes, with disclosure. A recorded lien is a title matter that escrow and the buyer will see and account for at closing, either by paying it off from proceeds or by pricing the purchase around it. What you cannot do honestly is sell without disclosing a known violation or lien, which California's disclosure law requires regardless of the property's condition.

About Code Violations and Foreclosure in California

Sources: Health and Safety Code 17980, Government Code 38773.1, 38773.5, Civil Code 2924k, HUD

Thinking about selling your house?

Get a fair, no-obligation cash offer in 24 hours and close in as little as 7 days. Sell as-is, no repairs or fees.

Get my cash offer →

More guides