What Affirmative Defenses Can a Tenant Raise in an Eviction Case in California?
If you have received an Unlawful Detainer Summons in California and you intend to contest the eviction one of the most important steps you can take is to identify every affirmative defense available to you based on the specific facts and circumstances of your case. An affirmative defense is a legal claim that — even if the allegations in the Unlawful Detainer Complaint are true — entitles you to remain in possession of your residence or to have the case dismissed because the landlord has not complied with applicable law or because another legal basis precludes the eviction from proceeding.
Affirmative defenses are raised in the Answer to Unlawful Detainer Complaint (Judicial Council Form UD-105). The current version of the UD-105 form — effective January 1, 2026 — contains specific checkboxes for the most commonly asserted affirmative defenses. For each affirmative defense you raise you must state brief supporting facts in the space provided on the form or on an attachment using Judicial Council Form MC-025. You will be expected to present evidence at trial to substantiate each affirmative defense you assert.
The following is a comprehensive discussion of every affirmative defense available to California tenants in unlawful detainer proceedings, with citations to the applicable civil code provisions and governing case law.
Defense 1 — Breach of the Implied Warranty of Habitability
California law imposes on every residential landlord an implied duty to maintain the rental property in a habitable condition throughout the tenancy. A dwelling is deemed untenantable if it substantially lacks effective waterproofing and weather protection, adequate heating, plumbing and gas facilities, hot and cold running water, sewage disposal, electrical lighting, clean and sanitary building and grounds, adequate garbage receptacles, and floors, stairways, and railings maintained in good repair. CC § 1941.1
The California Supreme Court held in the landmark decision Green v. Superior Court (1974) 10 Cal.3d 616 that a warranty of habitability is implied by law in all residential leases in California and that the breach of such warranty may be raised as a defense in an unlawful detainer action based on nonpayment of rent. The Court held that the landlord's obligation to maintain habitable premises and the tenant's obligation to pay rent are mutually dependent — meaning that if the landlord breaches the implied warranty the tenant may demonstrate that no rent is in fact due and owing. The Court defined the standard as follows: the implied warranty of habitability does not require perfect or aesthetically pleasing conditions but does require that bare living requirements be maintained, with substantial compliance with applicable building and housing code standards that materially affect health and safety.
When a tenant raises this defense in a nonpayment of rent unlawful detainer action the Court is required to determine the reasonable rental value of the premises in their untenantable condition. If the Court finds that a substantial breach of habitability occurred it shall deny possession to the landlord and adjudge the tenant to be the prevailing party, conditioned upon payment by the tenant of the reasonable rental value of the uninhabitable premises. Green v. Superior Court (1974) 10 Cal.3d 616; Knight v. Hallsthammar (1981) 29 Cal.3d 46. CC § 1941, CCP § 1174.2
Important Note: The defense of implied warranty of habitability is applicable only to residential tenancies. It is not available as a defense in unlawful detainer actions involving commercial tenancies. Fish Construction Co. v. Moselle Coach Works, Inc. (1983) 148 Cal.App.3d 654, 658.
Defense 2 — Repair and Deduct
California law expressly grants a residential tenant the right to make repairs to the rental property and deduct the reasonable cost of those repairs from the rent — subject to specific conditions. The repair must be necessary to make the unit habitable. The landlord must have been notified of the uninhabitable condition and given a reasonable time to make the repair. The cost of the repair may not exceed one month's rent. The tenant may not exercise this remedy more than twice in any 12-month period. CC § 1942
The California Supreme Court recognized in Schweiger v. Superior Court (1970) 3 Cal.3d 507 that to deny a tenant a defense against eviction based on the tenant's exercise of the repair and deduct remedy would emasculate the statutory right granted to tenants by CC § 1942. If a landlord files an Unlawful Detainer Complaint based on nonpayment of the amount properly deducted by the tenant under this remedy the tenant may raise their lawful exercise of the repair and deduct remedy as an affirmative defense.
Defense 3 — Retaliatory Eviction
California law expressly prohibits a landlord from filing an eviction lawsuit in retaliation for a tenant having exercised a legally protected right. CC § 1942.5
The California Supreme Court first recognized the common law defense of retaliatory eviction in Schweiger v. Superior Court (1970) 3 Cal.3d 507, holding that a tenant may defend an unlawful detainer action on the ground that the landlord commenced the eviction in retaliation for the tenant's exercise of their statutory rights under CC § 1942. The Legislature subsequently codified and expanded this protection in CC § 1942.5. The California Supreme Court further extended the scope of the retaliatory eviction defense in S.P. Growers Association v. Rodriguez (1976) 17 Cal.3d 719, holding that the defense extends beyond complaints about conditions of tenancy to encompass any lawful exercise of rights under the law, including the filing of a federal lawsuit.
The defense of retaliatory eviction has been described by the California Supreme Court as "firmly ensconced in this state's statutory law and judicial decisions." Barela v. Superior Court (1981) 30 Cal.3d 244, 249. As the Court stated in S.P. Growers Association v. Rodriguez (1976) 17 Cal.3d 719, 724: "It is settled that a landlord may be precluded from evicting a tenant in retaliation for certain kinds of lawful activities of the tenant. As a landlord has no right to possession when he seeks it for such an invalid reason, a tenant may raise the defense of retaliatory eviction in an unlawful detainer proceeding."
Under CC § 1942.5(a) there is a rebuttable presumption of retaliation if the landlord serves a notice to recover possession or commences an eviction action within 180 days after the tenant has engaged in any of the following protected activities:
— Complained in good faith to the landlord about habitability conditions or necessary repairs — Filed a written complaint with an appropriate government agency regarding habitability — Requested repairs pursuant to CC § 1942 — Used the repair and deduct remedy — Organized or participated in a tenants' rights organization or association, or lawfully and peaceably exercised any rights under the law
Under CC § 1942.5(d) it is also unlawful for a landlord to retaliate against a tenant for lawfully organizing or participating in a tenants' association or for lawfully and peaceably exercising any rights under the law — even outside the 180-day presumptive period, provided the tenant can prove the retaliatory motive. A landlord found to have engaged in retaliatory eviction is liable to the tenant for actual damages and punitive damages. CC § 1942.5
Defense 4 — Discriminatory Eviction
The California Court of Appeal established in Abstract Investment Co. v. Hutchinson (1962) 204 Cal.App.2d 242 that a tenant defending an unlawful detainer action is entitled to prove that the eviction is being sought solely because of the tenant's race or other protected characteristic — and that such proof will bar the eviction because judicial enforcement of a discriminatory eviction constitutes state action in violation of the equal protection guarantees of the United States and California Constitutions.
California law broadly prohibits discrimination in housing on the basis of race, color, religion, sex, gender, gender identity, gender expression, sexual orientation, marital status, national origin, ancestry, familial status, source of income, disability, veteran or military status, or genetic information. Gov. Code § 12955. The Unruh Civil Rights Act independently prohibits discrimination by business establishments on the same protected bases. CC § 51. Federal law similarly prohibits housing discrimination on the basis of race, color, national origin, religion, sex, familial status, and disability. 42 U.S.C. § 3604
A tenant who believes the eviction is motivated by discrimination based on any protected characteristic may raise discriminatory eviction as an affirmative defense on the UD-105 form. The UD-105 includes a specific checkbox for this defense.
Defense 5 — Violation of the California Tenant Protection Act of 2019 (AB 1482)
The California Tenant Protection Act of 2019 (AB 1482) requires that a landlord have a valid just cause for terminating the tenancy of a qualifying tenant — one who has continuously and lawfully occupied a covered residential rental unit for 12 months or longer. CC § 1946.2
If AB 1482 applies to the tenant's rental unit and the landlord filed an Unlawful Detainer Complaint without having a valid just cause — or without properly stating the just cause in the written termination notice — the tenant may raise the landlord's failure to comply with AB 1482 as an affirmative defense on the UD-105 form. The UD-105 contains specific checkboxes for this defense including checkboxes for: failure to state a just cause for termination in the written notice; failure to provide an opportunity to cure alleged violations; and failure to provide the required relocation assistance for a no-fault just cause eviction.
A landlord who attempts to recover possession in material violation of CC § 1946.2 is liable to the tenant for actual damages, punitive damages of not less than $100 per day with a minimum recovery of $250, and reasonable attorney fees and costs.
Defense 6 — Violation of Local Rent Control or Just Cause Eviction Ordinance
Many cities and counties in California have enacted local rent control or just cause eviction ordinances that impose requirements on landlords beyond those required by state law. These include the City of Los Angeles Rent Stabilization Ordinance, the City of Los Angeles Just Cause Ordinance, the City of Santa Ana Rent Control Ordinance, and others.
A landlord's failure to comply with an applicable local rent control or just cause eviction ordinance before filing an Unlawful Detainer Complaint may constitute a complete defense to the eviction. The UD-105 form includes a specific checkbox for this defense. A tenant raising this defense should identify the specific local ordinance and describe the specific manner in which the landlord failed to comply with its requirements.
Defense 7 — Defective Three Day Notice
California courts require strict compliance with the notice requirements of CCP § 1161 and CCP § 1162. A Three Day Notice that fails to strictly comply with these statutory requirements may be legally defective and may constitute a complete defense to an unlawful detainer action predicated on that notice. Common notice defects that may render a Three Day Notice legally invalid include:
— The Three Day Notice to Pay Rent or Quit demanded an amount that included late fees, utilities, or other charges that are not rent. CCP § 1161(2) — The Three Day Notice to Pay Rent or Quit demanded an incorrect amount of rent — The notice failed to include the name, telephone number, and address of the person to whom rent must be paid as required by CCP § 1161(2) — The notice failed to specify at least one legally adequate method of payment — The Three Day Notice to Perform Covenant or Quit failed to adequately describe the specific lease violation with sufficient particularity. CCP § 1161(3) — The notice was not served in accordance with CCP § 1162 — for example, it was served on a minor or posted without first making the required reasonable attempts at personal service — The notice period was calculated incorrectly — failing to exclude Saturdays, Sundays, and court holidays as required by CCP § 1161 — The notice demanded rent for a period exceeding one year in violation of CCP § 1161 — The notice expired on or included a Saturday, Sunday, or court holiday in violation of CCP § 12a — The notice was served by a different method than what is alleged in the Proof of Service attached to the Unlawful Detainer Complaint
Defense 8 — Payment of Rent / Tender of Rent
If the landlord filed an Unlawful Detainer Complaint based on nonpayment of rent but the tenant paid the full amount of rent demanded in the Three Day Notice to Pay Rent or Quit within the three day period the landlord cannot lawfully proceed with the eviction based on that notice. Payment of the full amount demanded within the notice period is a complete defense. CCP § 1161(2)
A timely tender of the full rent demanded — even if the landlord refused to accept it — also extinguishes the tenant's obligation and constitutes a complete defense. The landlord's refusal of a timely tender of the full amount demanded does not revive the right to evict. CC § 1485, CC § 1511
Additionally, if the tenant was prevented from paying the demanded rent within the notice period by the landlord's own action or failure to act — for example, by the landlord's refusal to accept payment or failure to provide a valid address or method for payment — the tenant's obligation to pay is excused. CC § 1511
Defense 9 — Landlord's Waiver Through Acceptance of Rent
If the landlord accepted rent from the tenant after serving the Three Day Notice upon which the Unlawful Detainer Complaint is based the landlord may have waived the right to terminate the tenancy based on that particular notice. CCP § 1161.5
Acceptance of a partial rent payment after serving a Three Day Notice to Pay Rent or Quit does not necessarily constitute a full waiver — under CCP § 1161.5 the landlord may accept a partial payment and still pursue an action to recover the difference between the amount tendered and the amount actually due. However a landlord who accepts the full amount of rent demanded in the notice waives the right to proceed with eviction based on that notice. The UD-105 form includes a specific checkbox for waiver by acceptance of rent. CACI No. 4324 — Affirmative Defense — Waiver by Acceptance of Rent.
Defense 10 — Landlord's Failure to Comply With CC § 1962 — Disclosure of Owner Information
California law requires a landlord to disclose to the tenant in writing at the commencement of the tenancy — or within 15 days of a change — the name, telephone number, and usual business hours of the person authorized to manage the premises and the person authorized to receive notices and demands. CC § 1962
A successor owner who fails to comply with CC § 1962 is precluded from serving a Three Day Notice to Pay Rent or Quit or otherwise evicting a tenant for nonpayment of rent that accrued during the period of noncompliance. Group XIII Properties LP v. Stockman (2022) 85 Cal.App.5th Supp. 1.
Defense 11 — Landlord's Demand for Rent When Uninhabitable Conditions Exist — CC § 1942.4
A landlord of a dwelling may not demand rent, collect rent, issue a notice of a rent increase, or issue a Three Day Notice to Pay Rent or Quit if all of the following conditions exist: a public officer or employee who is responsible for the enforcement of housing laws has notified the landlord or the landlord's agent in writing of substandard conditions; the conditions have not been corrected within 35 days from the date of that notice; the conditions were not caused by the tenant; and the tenant has not refused entry to the landlord for the purpose of correcting the substandard conditions. CC § 1942.4
A landlord who violates CC § 1942.4 is liable to the tenant for actual damages and the tenant may raise the landlord's violation as an affirmative defense to the unlawful detainer action. CCP § 1174.21
Defense 12 — Domestic Violence, Sexual Assault, Stalking, Human Trafficking, or Abuse of Elder or Dependent Adult
California law provides specific and significant protections for tenants who are victims of domestic violence, sexual assault, stalking, human trafficking, or abuse of an elder or dependent adult. A landlord may not terminate a tenancy or file an eviction lawsuit against a tenant based on an act that constitutes domestic violence, sexual assault, stalking, or human trafficking when the act was committed against the tenant, a member of the tenant's immediate family, or a member of the tenant's household. CC § 1946.7, CCP § 1161.3
The UD-105 form includes specific checkboxes for this defense. A tenant asserting this defense should be prepared to provide documentation of the qualifying act — such as a police report, a protective order, or a signed statement from a qualified third-party professional — to support the defense at trial.
Defense 13 — Tenant Calling Police or Emergency Services
California law prohibits a landlord from evicting a tenant based on the tenant or another person calling the police or requesting emergency services — such as an ambulance — by or on behalf of a victim of abuse, a crime victim, or an individual in an emergency situation where the caller believed that assistance was necessary. CC § 1946.8
The UD-105 form includes a specific checkbox for this defense. A tenant asserting this defense should be prepared to present evidence documenting the call for police or emergency assistance and the circumstances of that call.
Defense 14 — Bankruptcy Automatic Stay
If the tenant has filed for protection under the United States Bankruptcy Code the automatic stay provisions of 11 U.S.C. § 362 prohibit a landlord from commencing or continuing an eviction proceeding against the tenant without first obtaining relief from the automatic stay from the United States Bankruptcy Court. A landlord who files or continues an unlawful detainer proceeding in violation of the automatic stay does so in contempt of the Bankruptcy Court.
The UD-105 form includes a specific checkbox for this defense. A tenant who has filed for bankruptcy should immediately notify the Superior Court of the bankruptcy filing and provide the bankruptcy case number and the district in which the bankruptcy was filed.
Defense 15 — Active Military Service — Servicemembers Civil Relief Act
A tenant who is a member of the United States armed forces on active duty — including members of the Army, Navy, Air Force, Marine Corps, Coast Guard, National Guard activated by federal order, and reservists on federal active duty — is entitled to the protections of the Servicemembers Civil Relief Act (SCRA). 50 U.S.C. § 3951
Under the SCRA a landlord may not evict a servicemember or their dependents from a residential dwelling during a period of military service without first obtaining a court order. In any eviction proceeding involving an active duty servicemember the Court must, upon application by the servicemember, grant a stay of proceedings of not less than 90 days if the servicemember's ability to pay rent is materially affected by military service. The protections of the SCRA extend to the servicemember's spouse, children, and dependents. 50 U.S.C. § 3951
The UD-105 form includes a specific checkbox for this defense. A tenant asserting this defense should provide documentation of their active duty status — such as military orders or an official letter from their commanding officer — to support the defense.
Defense 16 — Prior Judgment or Pending Action (Res Judicata / Lis Pendens)
A landlord may not pursue an unlawful detainer action against a tenant if there is already a prior judgment on the same cause of action between the same parties or if another action is currently pending between the same parties upon the same cause of action. These are the doctrines of res judicata (claim preclusion) and lis pendens (prior pending action).
The UD-105 form includes a specific checkbox for this defense. A tenant asserting this defense should be prepared to provide documentation of the prior judgment or the pending action including the court, case number, and current status of the other proceeding.
Defense 17 — Lease Negotiated in a Language Other Than English — CC § 1632
If the landlord negotiated the lease or rental agreement primarily in Spanish, Chinese, Tagalog, Vietnamese, or Korean but provided the written lease only in English the landlord may have violated CC § 1632, which requires that the landlord provide the tenant with a written translation of the lease in the language in which it was negotiated. A landlord's failure to comply with CC § 1632 may constitute a defense to the eviction if the tenant was unable to understand the English-language lease.
Defense 18 — Failure to Comply With Relocation Assistance Requirements
Where a landlord is evicting a tenant based on a no-fault just cause under AB 1482 — such as owner move-in, withdrawal from the rental market, or substantial remodel — the landlord is required to provide the tenant with relocation assistance equal to one month's rent or waive the tenant's last month's rent before the notice period expires. CC § 1946.2(d)
A landlord's failure to provide the required relocation assistance renders the notice of termination void — meaning the notice is legally ineffective and cannot serve as the basis for the eviction. A tenant who did not receive the required relocation assistance before the no-fault termination notice was served may raise this failure as a complete defense.
Similarly, several local just cause eviction ordinances in California — including the City of Los Angeles RSO and the Los Angeles County Just Cause Ordinance — require relocation assistance amounts that may significantly exceed the state minimum. A landlord's failure to provide the full amount of relocation assistance required by the applicable local ordinance may constitute a complete defense to the eviction under that ordinance.
Defense 19 — Displacement Under State or Federal Relocation Law
If the landlord is displacing the tenant through the use of state or federal funds — for example, through a government-funded rehabilitation or redevelopment project — the landlord must comply with the California Relocation Assistance Law and its implementing regulations, and/or the Federal Uniform Relocation Assistance and Real Property Acquisition Policies Act. Gov. Code §§ 7260-7277
A landlord's failure to comply with applicable state or federal relocation law requirements before proceeding with an eviction may constitute a complete defense to the unlawful detainer action. The UD-105 form includes a specific checkbox for this defense.
Defense 20 — Illegal Rent Increase
If the landlord's Three Day Notice to Pay Rent or Quit demands rent in an amount that reflects an illegal rent increase — for example, a rent increase that exceeds the annual cap permitted under AB 1482, a rent increase imposed in violation of a local rent control ordinance, or a rent increase imposed without providing the required advance written notice under CC § 827 — the notice may be overstated and legally defective to the extent it demands more than the legally permissible amount of rent.
A landlord may also not demand or collect a rent increase imposed during a declared state of emergency or local emergency in violation of California's anti-price gouging statute. Penal Code § 396
Defense 21 — Fair Debt Collection Practices Act Violation
If the Three Day Notice was served by a property management company or other non-owner entity that is collecting rent on behalf of the owner without first providing the tenant with a proper debt validation notice as required by the Fair Debt Collection Practices Act the notice may be legally defective. 15 U.S.C. § 1692g
How to Properly Assert Affirmative Defenses on the UD-105 Form
For each affirmative defense you assert on the UD-105 form you must state brief supporting facts in the designated space on the form. A bare checkbox without any supporting factual narrative is insufficient and may result in the defense being disregarded by the Court. The supporting facts should identify the specific conduct giving rise to the defense, the dates of the relevant events, and the manner in which the landlord's conduct violated applicable law.
You will be required to present evidence at trial to substantiate each affirmative defense you assert. Evidence may include photographs, written communications, repair requests, payment receipts, inspection reports from code enforcement agencies, bank records, signed declarations, and any other documentary evidence relevant to your defense. Gathering and organizing your supporting evidence well in advance of your trial date is critical.
Important Limitation: California unlawful detainer proceedings are summary proceedings in which the scope of issues that may be raised is limited to those directly relevant to the ultimate question of possession. Generally speaking, counterclaims and cross-complaints may not be filed in an unlawful detainer action. Green v. Superior Court (1974) 10 Cal.3d 616, 634; Knowles v. Robinson (1963) 60 Cal.2d 620, 625. A defendant in an unlawful detainer action may raise any affirmative defense which, if established, will preserve the tenant's possession of the premises — but may not introduce issues irrelevant to the right of immediate possession. Green v. Superior Court (1974) 10 Cal.3d 616, 634.
Do Not Wait — Call Tenant Eviction Defense Now
Identifying and asserting the correct affirmative defenses in your Answer to the Unlawful Detainer Complaint is one of the most critical steps you can take to protect yourself from eviction. The deadline for filing your Answer is short — 10 court days from the date of personal service — and the consequences of failing to respond within your deadline are severe.
Tenant Eviction Defense is an IRS 501(c)(3) nonprofit organization headquartered in Newport Beach, California dedicated to providing education, information, and guidance to Southern California tenants facing eviction. If you have received an Unlawful Detainer Summons or a Notice of Unlawful Detainer in the mail from the Court call our Eviction Defense Rapid Response Line immediately at (657) 510-6534, Monday through Friday from 8:30 a.m. to 6:00 p.m. Our staff is available to discuss your situation and help you understand the defenses that may be available to you.
Updated April 12, 2026.

