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.
| Step | What the city or county can do | Where it is written |
|---|---|---|
| Initial violation | Issue a notice, generally with at least 30 days to abate, less if there is an immediate health and safety threat | Health and Safety Code 17980 |
| Not corrected | Order repair, rehabilitation, vacation, or demolition | Health and Safety Code 17980 |
| Owner does not pay for the work | Record a nuisance abatement lien for the cost | Government Code 38773.1 |
| Once recorded | The lien has the force, effect, and priority of a judgment lien | Government Code 38773.1 |
| Alternative to a lien | Add the cost as a special assessment collected with the property taxes | Government Code 38773.5 |
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
What triggers a code enforcement case
| Common trigger | Why it draws attention |
|---|---|
| Overgrown vegetation, dead landscaping, accumulated debris | Visible from the street; frequently the first complaint filed by a neighbor |
| An unsecured pool or spa | A safety hazard the Building Code treats as urgent, sometimes with a shorter abatement window |
| Structural damage, a leaking roof, exposed wiring | Falls squarely under the substandard building definition in Health and Safety Code 17920.3 |
| Unpermitted construction discovered during a sale | A title or inspection issue that can stall or kill a traditional listing |
| Vacancy itself, in cities with an abandoned property ordinance | Covered 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
| Route | What it takes | What it avoids |
|---|---|---|
| Correct the violation yourself | The repair cost, on your own timeline, before the city's deadline | The lien, and the city doing the work at its own contractor's price |
| Sell as is, disclosing the violation | A buyer willing to take on the repair, usually at a discounted price reflecting it | Spending money on a house you are leaving, and the risk of missing the abatement deadline |
| Do nothing | Nothing, until the city acts | Nothing. 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
- Health and Safety Code 17980, repair or vacate orders
- Government Code 38773.1, the nuisance abatement lien
- Government Code 38773.5, the special assessment alternative
- Civil Code 2924k, the order liens are paid at a trustee's sale
- HUD, free housing counseling
Sources: Health and Safety Code 17980, Government Code 38773.1, 38773.5, Civil Code 2924k, HUD