The ceiling has been leaking for two months and your landlord keeps promising to fix it.
You finally call the city housing inspector, and within days an official notice is posted on the building. Then a week later, an eviction notice lands on your door.
The timing feels like punishment, and you are asking the right question: can a landlord evict you for calling code enforcement?
In almost every state, the answer is no. Anti-retaliation laws specifically protect tenants who report housing code violations.
A landlord cannot evict for calling code enforcement, and an eviction that follows your complaint is presumed retaliatory.
But protection only works if you know how to use it. Here is what the law says, how landlords try to get around it, and exactly what to do if it happens to you.
Can a Landlord Evict You for Calling Code Enforcement
No. Every state except a handful has a statute prohibiting landlords from retaliating against tenants who report code violations to government authorities.
Eviction, rent increases, and service reductions in response to your complaint are all covered.
The protection usually kicks in for a set period after your complaint, commonly six months to one year depending on the state. An adverse action inside that window is presumed retaliatory, which flips the burden onto the landlord to prove a legitimate reason.
This protection covers complaints to any government agency: the housing inspector, the health department, the fire marshal, or the building department. It also typically covers complaints you made directly to the landlord first, which is why reporting in writing matters.
The key word is retaliation. A landlord can still evict you for genuine, documented lease violations like nonpayment of rent.
What they cannot do is manufacture a reason because you called the inspector.
Learn the warning signs in our guide to retaliatory eviction signs and how to prove it, which covers the evidence courts find most convincing.
How Landlords Try to Disguise Retaliation
Most landlords who retaliate do not announce it. They reach for a pretext, a seemingly neutral reason that hides the real motive.
Knowing the common disguises helps you see through them.
The sudden lease violation is the classic move. After years of ignoring the same minor issue, the landlord suddenly issues a cure-or-quit notice for it days after your inspection.
The timing destroys their credibility.
Non-renewal is another tactic. Instead of evicting you mid-lease, the landlord simply refuses to renew and claims it is a business decision.
Many states still treat retaliatory non-renewal as illegal, so do not assume you have no recourse.
Constructive eviction attempts happen too. The landlord stops making repairs, shuts off amenities, or makes the unit miserable hoping you leave on your own.
This is illegal in most states and can actually give you grounds to break the lease.
Keep every piece of paper from this period. Notices, texts, emails, and the inspection report itself form a timeline, and timelines win retaliation cases.
What to Do If Your Landlord Tries to Evict You for Calling Code Enforcement
First, do not move out in a panic. An eviction notice is not an eviction.
Only a court can order you to leave, and you have the right to fight the case and raise retaliation as your defense.
Second, organize your timeline. Write down when you first complained to the landlord, when you called the inspector, when the inspection happened, and when the eviction notice arrived.
Attach copies of everything.
Third, respond to the eviction notice properly and on time. File your answer with the court and state retaliation as an affirmative defense.
Missing a deadline can cost you the case regardless of how strong your facts are.
Fourth, contact a tenant rights organization or legal aid office in your area. Retaliation cases are exactly what they handle every day, and many will represent you for free or at low cost.
Understanding the timeline helps you plan. Our guide to how long the eviction process takes shows you how much time each stage gives you to build your defense.
What You Can Win in a Retaliation Case
If the court finds the eviction was retaliatory, the eviction is typically dismissed and you get to stay. That alone is a complete victory for most tenants.
Many states also allow you to recover damages. This can include your court costs, attorney fees, and in some states a statutory penalty of one to three months of rent paid by the landlord to you.
You may also be able to terminate the lease yourself and recover moving costs if the landlord’s behavior made the situation untenable. The law does not force you to stay in a hostile landlord relationship.
In egregious cases, courts can issue injunctions ordering the landlord to stop the retaliatory behavior. Violating a court order carries far more serious consequences than violating a statute.
Before You Call Code Enforcement
Build your paper trail before you ever dial the inspector. Send your landlord a written repair request describing the problem, the date you noticed it, and a reasonable deadline for the fix.
Keep a copy of that request and any response. This establishes that you gave the landlord a fair chance, which strengthens both your inspection complaint and any later retaliation claim.
Take dated photos of the conditions you are reporting. Visual evidence makes the inspector’s job easier and creates an undeniable record of what the property looked like.
Then make the call with confidence. You followed the right steps, you documented everything, and the law protects what you are about to do.
Frequently Asked Questions
How do I prove the eviction was retaliation?
Timing is your strongest evidence. An eviction notice arriving days or weeks after your code complaint creates a presumption of retaliation in most states.
Add your written complaint history and the inspection report, and the timeline usually speaks for itself.
What if I never complained to the landlord first?
Going straight to code enforcement still counts as protected activity in most states. The law protects the complaint to the government agency itself.
That said, complaining to the landlord in writing first strengthens your case.
Can my landlord raise my rent after I call code enforcement?
A retaliatory rent increase is illegal under the same statutes that bar retaliatory eviction. If the increase follows your complaint within the protected period, challenge it the same way you would challenge an eviction.
Does retaliation protection apply to month-to-month tenants?
Yes. Anti-retaliation statutes apply regardless of lease type.
A landlord cannot use non-renewal or a no-cause termination to punish a month-to-month tenant for reporting violations during the protected period.
You Had Every Right to Call
Reporting unsafe housing conditions is not troublemaking. It is exactly what code enforcement exists for, and the law protects tenants who use it.
Document your timeline, meet every court deadline, and get help from a tenant organization. Landlords who retaliate count on tenants not knowing their rights.
Now you do.
