Palo Alto · Serving all of California

CALL US TODAY!

(650) 668-8000

How to Fight an Eviction in California: Tenant Defenses to an Unlawful Detainer

how-to-fight-an-eviction-in-california

TL;DR — Key Takeaways

  • How to fight an eviction in California begins with a deadline, not an argument. Under Code of Civil Procedure section 1167(a), the response is due within 10 days, excluding Saturdays, Sundays, and other judicial holidays, after the complaint is served, with five additional court days under (b) for service by mail or through the Secretary of State’s address confidentiality program.
  • Section 1170 gives the defendant three options on or before that day: answer, demur, or move to strike. As amended effective January 1, 2026, a demurrer or motion to strike must be heard not less than five and not more than seven court days after the notice of motion is filed.
  • The strongest defenses are usually about the notice and the conditions, not about fairness. A notice that fails Civil Code section 1946.2 is void by statute. A dwelling that meets the conditions in Civil Code section 1942.4 strips the landlord of the right to demand rent or serve a three-day notice at all.
  • Retaliation is a statutory defense with a clock. Under Civil Code section 1942.5(a), a landlord may not recover possession within 180 days of a tenant’s good faith complaint about tenantability, subject to the good faith rebuttal in subdivision (g).
  • The case moves fast. Under section 1170.5(a), trial is held not later than the 20th day after the request to set it. But under section 1161.2, the court file stays restricted unless the landlord wins, which is the single most important fact about an eviction’s effect on a rental record.

The Direct Answer

To fight an eviction in California, file a written response within 10 days, excluding weekends and judicial holidays, after being served with the unlawful detainer complaint. The response may be an answer, a demurrer, or a motion to strike, and the defenses that most often succeed challenge the notice, the conditions of the dwelling, or the landlord’s motive.

How to Fight an Eviction in California: The First 10 Days

Sections below are marked for the side they speak to. This one speaks to tenants, and landlords should read it as the calendar they are working against.

For tenants. Code of Civil Procedure section 1167(a) requires the response within 10 days, excluding Saturdays, Sundays, and other judicial holidays, after the complaint is served. Subdivision (b) adds five court days where service was completed by mail or through the address confidentiality program. That period was five days before Assembly Bill 2347 took effect on January 1, 2025, and a great deal of published material still says five. Do not plan around the older number, and do not assume the longer one without checking how you were served.

Section 1170(a) gives three ways to respond on or before the day fixed for appearance: answer, demur, or move to strike any portion of the complaint. They do different jobs. An answer contests the facts and raises affirmative defenses. A demurrer says that even if the complaint is entirely true it does not state a case – the usual vehicle for a defective notice. A motion to strike removes improper matter.

Section 1170(b), as amended effective January 1, 2026, sets the timing for the second and third: the hearing must be not less than five nor more than seven court days after the notice of motion is filed, with all moving and supporting papers served with the notice. The parties may stipulate to a later date, and for a residential tenancy the court may set one for good cause. Under subdivision (c), opposition and reply may be made orally at the hearing.

For landlords. The compressed motion calendar cuts both ways. A demurrer that succeeds usually costs weeks, not the case, but the weeks are real, and the notice defect that supports it was fixable before filing.

Unlawful Detainer Defenses California Courts Actually Hear

Defense Authority What it requires
Defective or void notice Civ. Code Sec. 1946.2(g); CCP Sec. 1161(2)-(4) Noncompliance with the section, or a notice missing required content, a short period, or improper service
No just cause stated Civ. Code Sec. 1946.2(a) and (b) Covered tenancy, 12 months’ occupancy, and a notice that states no cause or a cause not on the statutory list
Relocation assistance not paid Civ. Code Sec. 1946.2(d)(4) A no-fault termination where the payment or written waiver did not strictly comply
Untenantable conditions barring rent Civ. Code Sec. 1942.4(a) Substandard conditions, written notice from a housing enforcement officer, 35 days unabated without good cause, and conditions not caused by the tenant
Implied warranty of habitability Green v. Superior Court (1974) 10 Cal.3d 616 Substantial noncompliance with code standards materially affecting health and safety; minor violations are de minimis
Retaliation Civ. Code Sec. 1942.5(a) and (d) A good faith tenantability complaint or protected activity within the 180-day window, subject to the landlord’s good faith statement under (g)
Rent cap exceeded Civ. Code Sec. 1947.12(a) and (k) A demand that includes rent above the AB 1482 cap
Payment, tender, or acceptance CCP Sec. 1161(2) and (3) Rent paid or covenants performed within the notice period

Two of those deserve emphasis because they are statutory rather than equitable, and courts treat them differently as a result.

Section 1942.4(a) does not merely give a tenant damages. It provides that a landlord may not demand rent, collect rent, issue a rent increase notice, or issue a three-day notice to pay rent or quit if four conditions all existed before the demand: the dwelling substantially lacks a characteristic listed in Civil Code section 1941.1 or is substandard under Health and Safety Code section 17920.3; a public enforcement officer inspected and notified the landlord in writing; the conditions went 35 days unabated without good cause; and the tenant did not cause them. Subdivision (b) adds actual damages plus special damages of $100 to $5,000, with fees to the prevailing party. The dollar figures here are the statutory amounts as of drafting; the Legislature adjusts them periodically, so confirm the current numbers before relying on them.

Section 1946.2(g) is blunter still: an owner’s failure to comply with any provision of the just cause section renders the written termination notice void.

Can Habitability Problems or Retaliation Defeat an Eviction?

They can, and they work differently.

The habitability route has two forms. The statutory form is section 1942.4, which requires the enforcement-officer notice and the 35 days. The broader form is the implied warranty of habitability, and its source is Green v. Superior Court (1974) 10 Cal.3d 616, where the California Supreme Court held unanimously that a warranty of habitability is implied by law in residential leases and that its breach may be raised as a defense in an unlawful detainer action. The reasoning is that the tenant’s duty to pay rent and the landlord’s duty to maintain the premises are mutually dependent covenants rather than independent ones. Unlike section 1942.4, this route does not require a code inspection.

Green set the threshold as well, and it is not a low one. The warranty does not require premises in perfect, aesthetically pleasing condition, but “bare living requirements” must be maintained, and the Court said that in most cases substantial compliance with the building and housing code standards that materially affect health and safety will satisfy the landlord’s obligation. Quoting Hinson v. Delis, Green added that minor housing code violations standing alone which do not affect habitability are de minimis and will not entitle the tenant to a reduction in rent.

Two mechanics come with it. The trial court may, at either party’s request, require the tenant to pay rent at the contract rate into court as it becomes due for as long as the tenant remains in possession, and then determine at trial how that money is distributed. And where a breach is found, the measure Green endorsed is the difference between the fair rental value of the premises as warranted and their fair rental value in the condition the tenant actually occupied.

The retaliation route is section 1942.5. Subdivision (a) bars a landlord from recovering possession, causing the tenant to quit involuntarily, raising the rent, or decreasing services within 180 days of five listed triggers, the earliest being the tenant’s good faith notice under section 1942 or an oral complaint about tenantability, and the latest an adverse judgment on tenantability. The 180 days runs from the latest applicable trigger. Subdivision (b) limits a tenant to invoking it once in any 12-month period, and the tenant must not be in default on rent.

Subdivision (d) is separate and broader: it is unlawful to raise rent, decrease services, cause a tenant to quit, bring an action for possession, or threaten any of those to retaliate against a tenant who organized or participated in a tenants’ association or lawfully exercised any right. There the tenant bears the burden of producing evidence that the conduct was retaliatory.

Subdivision (g) is the landlord’s answer. A landlord may still act within the window if the notice states the ground on which the landlord in good faith seeks to act, and if that statement is controverted the landlord must establish its truth at trial. So a retaliatory eviction California law prohibits is not established by timing alone – but timing shifts the conversation, and subdivision (h) makes a violation worth actual damages plus punitive damages of $100 to $2,000 for each retaliatory act involving fraud, oppression, or malice – statutory amounts as of drafting – with fees to the prevailing party under subdivision (i) if either party requests them at the outset.

Subdivisions (c) and (e) add that reporting or threatening to report a tenant, or someone associated with a tenant, to immigration authorities is retaliatory conduct. Any waiver of these rights is void under subdivision (f).

What Happens at Trial and How Fast Does It Move?

Faster than any other civil case.

Section 1170.5(a) requires trial not later than the 20th day following the date the request to set the time of trial is made, and provides that if the plaintiff prevails a writ of execution issues immediately on request. Extensions require the agreement of all parties, or a hearing under subdivision (c) at which the court, on finding a reasonable probability the plaintiff will prevail, orders the tenant to pay rent into court or a court-designated escrow while remaining in possession. Subdivision (d) is the enforcement: if the tenant fails to make an ordered payment, trial is held within 15 days of the date payment was due.

Judgment is governed by section 1174. Subdivision (a) enters judgment for possession and declares forfeiture of the lease only if the section 1161 notice stated the landlord’s election to declare forfeiture – if it did not, the lease is not forfeited. Subdivision (b) assesses damages and rent due, and allows statutory damages of up to $600, as the statute reads at drafting, in addition to actual damages where malice is shown.

For landlords, the two things that most often go wrong here are the forfeiture election left out of the notice and the writ requested before the judgment supports it. For tenants, the practical significance of the 20-day rule is that the time to gather records is before the request to set trial, not after.

Relief From Forfeiture: The Remedy Most Tenants Do Not Know About

Two provisions can undo a loss, and both are underused.

Section 1174(c) applies to nonpayment cases where the lease has not expired by its terms and the notice did not state an election to declare forfeiture. The court may – and where the lease is written, for a term of more than one year, and contains no forfeiture clause, must – order that no writ issue for five days after entry of judgment, during which the tenant or any other party interested in the term may pay the rent found due with interest, the damages, and the costs, satisfy the judgment, and be restored to the tenancy.

Section 1179 is broader. The court may relieve a tenant against forfeiture of a lease, written or oral, whether or not the tenancy has terminated, in case of hardship, and may do so on its own motion. The application may be made at any time before the premises are restored to the landlord, by the tenant, a subtenant, a mortgagee of the term, or any person interested in its continuance. It must be verified, with notice served at least five days before the hearing, though a self-represented applicant may apply orally if the landlord is present or has had ex parte notice. Relief is never granted except on condition of full payment or performance, so far as practicable.

How Does an Eviction Affect a Tenant’s Record?

Less automatically than the folklore says, and the governing provision is Code of Civil Procedure section 1161.2.

Under subdivision (a)(1), the clerk allows access to the court file, index, and register of actions only to a party or a party’s attorney; to a person who supplies the names of at least one plaintiff and one defendant plus the address including unit number; to a resident of the premises who supplies a party name or case number and proof of residency; to a person by court order on a showing of good cause, which may be granted ex parte; and to any other person only in the two situations in subparagraphs (E) and (F). Those are judgment for the plaintiff after trial more than 60 days after filing, in which case the court issues the access order with the judgment, and judgment against all defendants entered for the plaintiff within 60 days of filing, after which the clerk allows access at the 60-day mark.

The practical translation: the record stays restricted unless the landlord wins. A case that is dismissed, settled, or decided for the tenant does not open. Subdivision (a)(2) also lets the parties stipulate to an order barring access entirely.

Subdivision (c) requires the clerk to mail each named defendant a notice, between 24 and 48 hours after filing excluding weekends and holidays, stating that an eviction action has been filed and that access is delayed 60 days, and carrying county bar association, certified lawyer referral service, State Bar and legal services contact information. One copy goes to “all occupants” at the premises. That notice is not service of the summons and complaint, and treating it as the start of the response clock is a mistake.

When to Bring Counsel In

Three triggers. The day the complaint is served, because the 10-day clock excludes weekends and holidays and the arithmetic is easy to get wrong in the direction that loses the case. Any case where the defense is habitability, because the statutory route under section 1942.4 and the implied warranty route have different proof requirements and only one of them needs an inspection. And any point after judgment but before the premises are restored, because section 1179 relief remains available right up to that moment and stops being available after it.

Several adjacent questions are covered separately: what the unlawful detainer lawsuit involves from the start, how the notice that precedes it has to be written and served, how the rent cap and just cause rules decide whether the landlord could file at all, what a landlord’s remedies look like when a tenant breaches, and how commercial eviction differs from the residential process described here.

Work with Bay Legal

Bay Legal, PC represents California tenants and landlords in unlawful detainer matters, from the response deadline through trial, judgment, and relief from forfeiture. If you have been served, or you are about to file, call (650) 668-8000 in Northern California or (213) 668-8000 in Southern California, or schedule a consultation at https://baylegal.com/contact-us/.

Frequently Asked Questions

How long does a tenant have to respond to an unlawful detainer?

Ten days, excluding Saturdays, Sundays, and other judicial holidays, after the complaint is served, with five additional court days if service was completed by mail or through the Secretary of State’s address confidentiality program. This changed on January 1, 2025; before that the period was five days, and a great deal of published material still says five. The response may be an answer, a demurrer, or a motion to strike, and it must be filed on or before the day fixed for appearance.

What are the most common defenses to a California eviction?

Most successful defenses attack the notice rather than the merits: a notice that states no just cause where one is required, that omits the payment information the three-day notice statute requires, that gives too short a period, or that was served by a method the facts did not support. Beyond the notice, the recurring defenses are untenantable conditions barring the rent demand, retaliation, a rent demand that exceeds the AB 1482 cap, and payment or performance within the notice period.

Can habitability problems or retaliation defeat an eviction?

Both can. The statutory habitability route requires that a housing enforcement officer inspected and notified the landlord in writing, that the conditions went 35 days unabated without good cause, and that the tenant did not cause them; where those apply, the landlord may not demand rent or serve a three-day notice at all. Retaliation bars recovery of possession within 180 days of a good faith tenantability complaint, though the landlord may still proceed by stating a good faith ground and proving it at trial.

What happens at an unlawful detainer trial and how fast does it move?

Trial is held not later than the 20th day after the request to set it, and if the landlord prevails a writ of execution issues immediately on request. Extensions need the agreement of all parties, or a hearing at which the court may order the tenant to pay rent into court or escrow while remaining in possession; if an ordered payment is missed, trial is held within 15 days. Judgment declares forfeiture of the lease only if the notice stated the landlord’s election to declare it.

How does an eviction affect a tenant’s record and future rentals?

The court file, index, and register of actions stay restricted from general public access unless the landlord wins. Access opens to anyone only where judgment is entered for the landlord after trial more than 60 days after filing, or where judgment against all defendants was entered within 60 days of filing. A case that is dismissed, settled, or decided for the tenant does not open, and the parties may stipulate to an order barring access entirely.

Disclaimer: This article is for general informational purposes only and is not legal, tax, or financial advice. Reading it or contacting Bay Legal, PC does not create an attorney-client relationship. It addresses California law only; other states differ. The law changes, and figures and procedures described here may be updated after this article’s publication date.

BOOK A CONSULTATION

Latest Legal Blogs

Hear From Our Clients