In California, “eviction” is a lawsuit. A landlord cannot legally force a tenant out by changing the locks, removing belongings, or shutting off the power — those are illegal “self-help” tactics. The only lawful path to recover possession from a tenant who will not leave is a special court case called an unlawful detainer. This guide walks through the unlawful detainer process step by step: the written notices that must come first, the lawsuit itself, the tenant’s short window to respond, the trial, the judgment, and the sheriff’s lockout — plus the strict ban on doing any of this outside the courts.

This is general legal information, not legal advice. Eviction deadlines are short and unforgiving, and a single defective notice can sink a case or be the tenant’s best defense. Before serving a notice, responding to one, or filing or defending an unlawful detainer, consult an attorney licensed by the State Bar of California.

It starts with a written notice

Every eviction begins with a written notice that the landlord serves on the tenant. The type of notice depends on the reason for the eviction, and getting the form, the timing, and the service method exactly right is critical — courts strictly enforce these requirements.

  • 3-day notice to pay rent or quit. Used when the tenant owes rent. It must state the precise amount of rent due (not other charges) and give the tenant three days to pay or move out. If the tenant pays in full within the period, the tenancy continues.
  • 3-day notice to perform covenant or quit (cure or quit). Used when the tenant has a curable lease violation — for example, an unauthorized pet. The tenant has three days to fix the problem or leave.
  • 3-day notice to quit (no cure). Used for serious, non-curable grounds such as certain nuisance, illegal activity, or major waste. No opportunity to cure is given.
  • 30-, 60-, or 90-day termination notice. Used to end a tenancy without an at-fault reason. A 30-day notice generally applies when a tenant has lived in the unit less than one year; a 60-day notice when a tenant has lived there a year or more (Civ. Code § 1946.1). Certain situations, such as some subsidized tenancies, require 90 days.

Where AB 1482’s just-cause rule applies, a no-fault termination notice must also state the just-cause ground and, for no-fault grounds, address the required relocation assistance. See our AB 1482 guide for those requirements.

The California statutes that govern unlawful detainer

The unlawful detainer remedy is created and defined by the Code of Civil Procedure. Code of Civil Procedure § 1161 sets out the situations in which a tenant is guilty of unlawful detainer — including holding over after the lease ends, defaulting on rent after a 3-day notice, and breaching the lease after a 3-day cure notice. Related sections govern the summons, the tenant’s response time, the trial, and the writ of possession. Termination notice periods come from Civil Code § 1946.1, and just-cause requirements from Civil Code § 1946.2. The ban on self-help eviction comes from Civil Code § 789.3. Because these provisions interlock, a notice or filing that is defective under any one of them can defeat the entire case.

Filing the unlawful detainer lawsuit

If the notice period expires and the tenant has not complied or moved out, the landlord may file an unlawful detainer complaint in the superior court for the county where the property sits. The landlord then has the tenant served with a summons and a copy of the complaint. Service must follow the rules; improper service is a common reason cases are delayed or dismissed.

The tenant’s response — a very short window

Once served, the tenant has a short, strict deadline to file a written response with the court. Historically this was five days; recent legislation has adjusted the count, and depending on how and when the tenant was served, the response window is commonly counted in court days and can extend somewhat with certain service methods. The point for both sides is the same: the clock is short, it is measured in days, and missing it has serious consequences. A tenant who does not respond in time risks a default judgment, which can lead to a lockout without a trial. A tenant who wants to contest the eviction must file a response — usually an Answer raising defenses, or sometimes a Demurrer or Motion to Quash challenging the notice or service — within the deadline. Tenants who cannot afford the filing fee can request a fee waiver.

Trial

Unlawful detainer cases are “summary” proceedings, meaning the law requires them to be heard quickly — far faster than an ordinary civil lawsuit. If the tenant files a timely response, either side can request a trial, and the court sets it on an expedited schedule. At trial, the landlord must prove a valid notice, proper service, and a lawful ground for eviction; the tenant can raise defenses such as a defective notice, retaliation (Civ. Code § 1942.5), breach of the warranty of habitability, discrimination, or that the rent was actually paid. Many cases settle before or at trial, sometimes with a move-out date and a waiver of past-due rent.

Judgment and the writ of possession

If the landlord wins — whether by default, by settlement, or after trial — the court enters a judgment for possession. The clerk then issues a writ of possession, which is the court’s order directing the sheriff to remove the tenant. The landlord delivers the writ to the county sheriff. The landlord still does not have the right to remove the tenant personally; only the sheriff may carry out the lockout.

The sheriff lockout

After receiving the writ, the sheriff posts a notice to vacate — commonly a 5-day notice — on the tenant’s door. If the tenant has still not left when the sheriff returns, the sheriff performs the lockout: the tenant must leave, the locks are changed, and the landlord regains possession. Only at this final stage, and only through the sheriff, does the tenant lose the legal right to remain.

Why the notice must be perfect

More unlawful detainer cases are won and lost on the notice than on anything else. California courts strictly construe eviction notices because the remedy is fast and the stakes are high. A 3-day notice to pay rent or quit that overstates the amount due, demands charges other than rent, miscalculates the deadline, or is served the wrong way is defective — and a defective notice means the landlord generally must dismiss and start over with a corrected one. The same precision applies to 30-, 60-, and 90-day termination notices and, where AB 1482 applies, to the just-cause statement the notice must contain. For landlords, this means treating the notice stage with care and matching the statute exactly. For tenants, it means a notice that looks “off” may be a real defense — one worth raising with an attorney or the court’s self-help center.

Court costs, judgments, and what a landlord can recover

If the landlord prevails, the judgment ordinarily restores possession and may also award unpaid rent, court costs, and — where the lease provides for it — attorney’s fees. A money judgment for back rent is separate from the writ of possession and is collected like any other civil judgment. A tenant who loses an unlawful detainer may also face a record of the case, which can affect future rental applications, although California law restricts public access to many unlawful detainer court files unless the landlord prevails within a set time. Because of these lasting consequences, many tenants negotiate a settlement — often a move-out date in exchange for a waiver of back rent and a neutral dismissal — rather than risk a judgment.

Step-by-step: the unlawful detainer timeline

  1. Serve the correct written notice — 3-day pay-or-quit, 3-day cure-or-quit, 3-day quit, or a 30/60/90-day termination — matched to the reason and properly served.
  2. Wait out the notice period. If the tenant pays or cures (where allowed), or moves out, the case may end here.
  3. File the unlawful detainer complaint in superior court under Code of Civil Procedure § 1161, and have the tenant served with the summons and complaint.
  4. Tenant responds within the short deadline (counted in days from service). No timely response risks a default judgment.
  5. Trial on an expedited schedule if the case is contested; the landlord proves the notice, service, and grounds, and the tenant raises any defenses.
  6. Judgment for possession if the landlord prevails, followed by issuance of the writ of possession.
  7. Sheriff posts the notice to vacate (commonly 5 days) and performs the lockout if the tenant has not left.

An uncontested case often runs roughly five to eight weeks from notice to lockout; a contested case can take several months.

The ban on self-help eviction

Because the law provides this court process, it forbids landlords from taking shortcuts. Under Civil Code § 789.3, a landlord may not, for the purpose of forcing a tenant out, shut off or interfere with utilities, change the locks, remove doors or windows, or seize the tenant’s belongings. A landlord who does is liable for the tenant’s actual damages plus $100 for each day the violation continues, with a minimum of $250 per violation, plus the tenant’s attorney’s fees. These remedies apply even if the landlord has a valid reason to evict — the existence of grounds never excuses skipping the court process. If you are a tenant who has been locked out or had utilities cut, document the dates and contact an attorney or your court’s self-help center right away.

Tenant resources and getting help in time

Because the response window is measured in days, a tenant served with an unlawful detainer should act immediately. Every California superior court operates a self-help center that can explain the forms and deadlines, and many counties have legal aid organizations and tenant-defense clinics that represent qualifying tenants for free or at low cost. A tenant who cannot afford the filing fee can request a fee waiver from the court. Waiting to seek help is the single most damaging mistake a tenant can make, because a default judgment entered for missing the deadline is far harder to undo than a case defended on the merits.

For landlords, the parallel lesson is that the unlawful detainer process rewards patience and precision over speed and shortcuts. A landlord who serves a clean notice, files correctly, and lets the court process run will usually recover possession faster than one who cuts corners, serves a defective notice, or — worst of all — resorts to a lockout and ends up defending a self-help claim under Civil Code § 789.3. The court process exists to make eviction orderly and lawful for both sides; using it properly is in everyone’s interest.

Frequently asked questions

How long do I have to respond after being served with an eviction lawsuit?

The window is short — counted in days from service and varying somewhat with how you were served. Do not wait. Missing the deadline can result in a default judgment and a lockout without a trial. If you intend to contest the eviction, file your written response immediately and ask the court’s self-help center or an attorney for help if needed.

Can my landlord just change the locks if I’m behind on rent?

No. That is illegal self-help eviction under Civil Code § 789.3, regardless of how much rent you owe. The landlord must go through the unlawful detainer process, and only a sheriff acting on a court order may lock you out. A landlord who locks you out can owe damages of at least $100 per day plus your attorney’s fees.

If I pay the rent I owe within the 3-day notice period, does the eviction stop?

For a 3-day notice to pay rent or quit, paying the full amount stated in the notice within the three days generally stops that eviction and continues the tenancy. The notice must state the correct amount; if it overstates the rent due or includes other charges it may be defective. Paying does not cure other types of notices, such as a no-cure 3-day notice for serious misconduct.

What defenses can a tenant raise at trial?

Common defenses include a defective or improperly served notice, payment of the rent, breach of the warranty of habitability, retaliation under Civil Code § 1942.5, discrimination, and — where it applies — the landlord’s failure to satisfy AB 1482’s just-cause or relocation requirements. The available defenses depend on the facts, so get advice.

How quickly can I be physically removed?

Not until the very end. Even after a judgment, the landlord must obtain a writ of possession and deliver it to the sheriff, who posts a notice (commonly 5 days) before performing the lockout. No one but the sheriff may remove you, and only after these steps.

Service of the notice and the summons

How a notice and the lawsuit are delivered matters as much as their content. California law specifies the permitted methods of serving an eviction notice — personal delivery to the tenant, leaving it with a suitable person at the home and also mailing a copy, or, as a last resort when no one can be reached, posting it conspicuously and mailing a copy. The summons and complaint that start the lawsuit have their own, stricter service rules. If service is botched — the wrong method, an incorrect address, or service on the wrong person — the case can be delayed or dismissed, and the timeline resets. Tenants who were never properly served may have grounds to set aside a default. The deadlines that follow service are counted carefully, often in court days, and the count can shift depending on how service was accomplished. Both sides benefit from documenting exactly when and how every paper was delivered.

After the case: judgments and rental history

An unlawful detainer leaves a footprint beyond the immediate dispute. A money judgment for back rent and costs is enforceable like any civil debt and can be collected through wage garnishment or bank levies if it goes unpaid. California limits public access to many unlawful detainer court records, masking them unless the landlord prevails within a defined period after filing, which shields some tenants from having a mere filing follow them. Still, a judgment against a tenant can surface in tenant-screening reports and make future rentals harder to secure. These downstream consequences are a major reason tenants and landlords so often settle — a negotiated move-out with a dismissal and a rent waiver can spare the tenant a damaging record while giving the landlord prompt, certain possession without the cost and delay of a contested trial.

Talk to a California eviction attorney

Unlawful detainer is fast, technical, and high-stakes for both sides — a defective notice can cost a landlord weeks, and a missed response deadline can cost a tenant their home. A California attorney can prepare or challenge the notice, handle the filing or the response, and represent you at trial. Start with the landlord-tenant hero guide for the big picture, and if your case turns on the rent cap or just-cause rules, read our guide to California’s rent control law (AB 1482). Our directory connects you with attorneys licensed by the State Bar of California across all 58 counties, free and with no obligation.