California Civil Code Section 1940 is the statute that defines who qualifies as a residential tenant in California, and it is the trigger that turns on the state’s broader landlord-tenant protections. It applies to anyone who “hires a dwelling unit” in the state, including tenants, lessees, boarders, and lodgers, and once it applies, a long list of related Civil Code provisions governs habitability, entry, deposits, harassment, retaliation, and eviction. If your living situation falls inside Section 1940, you have rights your landlord cannot waive by relabeling the arrangement.
Who Section 1940 Covers
Section 1940 reaches “persons who hire dwelling units located within this state.” That includes tenants, lessees, boarders, lodgers, and anyone else paying to occupy a residential space, regardless of the label on the paperwork.1California Legislative Information. California Code Civil Code 1940 A “dwelling unit” is a structure, or part of one, used as a home, residence, or sleeping place by a single person maintaining a household or by two or more people sharing one. Apartments, rented houses, rooms in a shared home, and most other residential arrangements fit inside that definition.
The practical effect is broad. A landlord cannot dodge tenant protections by calling the agreement a “license” or the occupant a “guest” when the arrangement functions as a tenancy. If someone pays for the right to live in a space, Section 1940 presumptively applies.
Short-Term Hotel and Motel Stays Are Excluded
The statute carves out two categories of short-term occupants who do not receive tenant status. The first is anyone whose stay at a hotel, motel, or similar facility is subject to the local transient occupancy tax under Revenue and Taxation Code Section 7280. A person in this category can lose the exclusion, and gain tenant protections, by failing to pay all charges owed through the last day the stay would be subject to the transient occupancy tax.1California Legislative Information. California Code Civil Code 1940
The second exclusion applies at hotels and motels where the innkeeper retains control of the unit and provides every resident all of the following: property safeguarding facilities, central telephone service, maid and room services, stays of less than seven days, and food service from an on-site or affiliated restaurant. All five conditions must be met. If the operator drops even one, or gives up control of the unit, an occupant can cross from guest to protected tenant, which matters most in residential hotels and extended-stay situations.
Habitability and the Right to Repair and Deduct
Every residential landlord owes a duty to keep the unit habitable. Civil Code Section 1941.1 sets the minimum standards. A unit is unfit to live in if it lacks any of the following:2California Legislative Information. California Code Civil Code 1941.1
- Intact roof, exterior walls, windows, and doors
- Plumbing and gas facilities in good working order that met code when installed
- Hot and cold running water connected to an approved sewage system
- Working heating that met code when installed
- Functional electrical lighting, wiring, and equipment
- Building and grounds kept free of garbage, filth, and pest infestations
- Floors and stairs maintained in good repair
Starting January 1, 2026, new or renewed leases must also include a working stove and refrigerator.
When a landlord ignores a habitability problem after notice, Civil Code Section 1942 gives you two self-help options. You can hire someone to make the repair yourself and subtract the cost from your next rent payment, as long as the repair costs no more than one month’s rent, and you can use this remedy twice in any 12-month period.3California Legislative Information. California Code CIV 1942 Waiting at least 30 days after giving notice creates a legal presumption that the landlord had reasonable time to act. Urgent problems may justify a shorter wait.
The other option is to move out. If a serious defect goes unrepaired after notice, you can vacate and stop paying rent as of the day you leave. Because that is a significant step, document the problem, the notice you gave, and the landlord’s failure to respond.
When and How Your Landlord Can Enter
Civil Code Section 1954 limits landlord entry to specific reasons: emergencies, necessary or agreed-upon repairs and maintenance, showings to prospective buyers or tenants, entry after abandonment, or entry under a court order.4California Legislative Information. California Code Civil Code 1954 Outside of emergencies, the landlord must give reasonable written notice stating the date, approximate time, and purpose. Twenty-four hours is presumed reasonable, and the entry must happen during normal business hours. Mailed notice must be sent at least six days before the planned entry.
The statute flatly prohibits abusing the right of access or using it to harass. Repeated unnoticed entries, or manufactured reasons to enter, are the kind of conduct that can also trigger liability under the anti-harassment statute discussed below.
Lockouts and Utility Shutoffs Are Illegal
Civil Code Section 789.3 forbids the most aggressive form of illegal eviction: a landlord acting outside the courts. A landlord cannot cut off utilities to force you out. That covers water, heat, electricity, gas, telephone, elevator service, and refrigeration, whether or not the landlord directly controls the utility account.5California Legislative Information. California Code Civil Code 789.3 The same statute bars a landlord from changing the locks, using a boot lock, removing outside doors or windows, or removing your personal belongings without your prior written consent.
The penalties are steep and are designed to make self-help eviction costly. A tenant who wins under Section 789.3 can recover actual damages plus up to $100 per day the violation continues, with a guaranteed minimum of $250 per separate violation. Repeated violations that don’t happen at the same time as the initial one count as separate causes of action. The court must award reasonable attorney’s fees to the prevailing party, and tenants can seek an injunction to stop the conduct while the case is pending.
Harassment and Coercion to Get You to Leave
Where Section 789.3 targets physical interference, Civil Code Section 1940.2 targets coercive behavior meant to push you into leaving voluntarily. It is unlawful for a landlord to do any of the following to influence a tenant to vacate:6California Legislative Information. California Code Civil Code 1940.2
- Engage in conduct that violates Penal Code Section 484 (theft)
- Engage in conduct that violates Penal Code Section 518 (extortion)
- Use or threaten force, willful threats, or menacing conduct that would make a reasonable person fear harm and that interferes with quiet enjoyment
- Commit a significant and intentional violation of the landlord entry rules in Section 1954
- Threaten to disclose the immigration or citizenship status of a tenant, occupant, or associated person
A tenant who prevails, including in small claims court, can recover a civil penalty of up to $2,000 for each violation. The statute does not explicitly provide for actual damages or attorney’s fees, so a tenant with financial losses may need to combine the claim with other theories. A landlord who issues a good-faith warning about a genuine lease violation, or who explains rules in the normal course of business, is not violating Section 1940.2 even if the tenant finds the communication unwelcome.
Immigration Status Protections
California adds a separate and stronger protection against immigration-based intimidation. Civil Code Section 1940.35 makes it unlawful for a landlord to actually disclose a tenant’s or occupant’s immigration or citizenship status to any immigration authority, law enforcement agency, or government agency when the disclosure is meant to harass, retaliate, or pressure the tenant to leave.7California Legislative Information. California Code Civil Code 1940.35
A court that finds a violation must order statutory damages of between 6 and 12 times the monthly rent for each person whose status was disclosed. At $2,000 in rent, that is $12,000 to $24,000 per person affected. The court must also issue an injunction to prevent similar conduct toward other tenants, notify the local district attorney about a potential extortion violation, and award attorney’s fees and costs to the prevailing party. Any waiver of these rights in a lease is void. A landlord does not violate the section when complying with a federal legal obligation or responding to a court-issued subpoena, warrant, or order.
Retaliation After You Exercise Your Rights
Civil Code Section 1942.5 prevents landlords from punishing tenants for using the protections above. A landlord cannot evict, raise rent, or reduce services within 180 days after a tenant takes any of these protected actions:8California Legislative Information. California Code CIV 1942.5
- Notifying the landlord of a habitability problem or suspected bed bug infestation
- Filing a complaint with a government agency about the condition of the unit
- Having the unit inspected or receiving a citation tied to a habitability complaint
- Starting a legal or arbitration proceeding about the unit’s condition
- Winning a judgment or arbitration award on a habitability issue
The 180-day window runs from the most recent protected event, and the tenant must be current on rent for the protection to apply. Separately, it is always unlawful to retaliate against a tenant for lawfully participating in a tenant organization or exercising any legal right, though in that situation the tenant carries the burden of proving retaliation. Threatening to report a tenant or associated person to immigration authorities also counts as prohibited retaliation.
Security Deposit Limits and 21-Day Return
Civil Code Section 1950.5 caps security deposits at one month’s rent for most landlords. A small landlord who is a natural person, or an LLC whose members are all natural persons, and who owns no more than two rental properties totaling four or fewer units may charge up to two months’ rent.9California Legislative Information. California Code CIV 1950.5 The cap applies regardless of what the landlord calls the payment.
After you move out, the landlord has 21 calendar days to return the deposit with an itemized statement. The statement must explain the basis and amount of each deduction. If the landlord or an employee did the repair work, the statement has to include hours spent and the hourly rate. If an outside contractor did the work, the landlord must attach the bill or invoice and the contractor’s contact information. Deductions for materials or supplies require receipts; deductions for cleaning or repairs must be accompanied by photographs. Missing the deadline or failing to document deductions exposes the landlord to liability for the full deposit plus additional damages.
Rent Caps and Just Cause Under AB 1482
California’s Tenant Protection Act added two protections that apply to most residential tenancies statewide.
Annual Rent Increase Cap
Under Civil Code Section 1947.12, a landlord cannot raise rent by more than 5% plus the local rate of inflation, or 10%, whichever is lower, during any 12-month period. The cap is calculated from the lowest rent charged for the unit during the 12 months before the increase.10California Legislative Information. California Code CIV 1947.12 Several categories are exempt, including units built within the last 15 years on a rolling basis, deed-restricted affordable housing, certain dormitories, and owner-occupied duplexes. Single-family homes and condominiums are exempt only if the owner is not a corporation, REIT, or LLC with a corporate member, and only if the landlord has given the tenant specific written notice of the exemption. Without that written notice, the exemption does not apply.
Just Cause Eviction
Under Civil Code Section 1946.2, once a tenant has lived in a unit continuously for 12 months, the landlord can only terminate the tenancy for a listed just cause.11California Legislative Information. California Code CIV 1946.2 At-fault just cause includes nonpayment of rent, breach of a material lease term, maintaining a nuisance, waste, refusing to sign a renewal on substantially the same terms, criminal activity on the property, unauthorized subletting, and refusing to allow lawful landlord entry.
No-fault just cause covers reasons unrelated to tenant behavior: owner or family member move-in, withdrawal of the unit from the rental market, a government order requiring vacancy, or substantial remodel or demolition. When a landlord ends a tenancy under no-fault just cause, the landlord must provide relocation assistance equal to one month’s rent, either as a direct payment within 15 calendar days of serving the notice or as a waiver of the final month’s rent. The same exemptions that apply to the rent cap generally apply here, including the written-notice requirement for single-family homes and condos.