
In New York City, a landlord cannot lock you out by changing the locks. If you have lived in the unit for 30 consecutive days or more, or you entered under a lease or rental agreement, the only lawful way to remove you is a court proceeding ending in a warrant of eviction executed by a city marshal. Changing the cylinder, plugging the keyway, or taking the door off is an unlawful eviction under the New York City Administrative Code - and you can ask to be restored to the apartment.
This is the part that surprises people on both sides of the dispute. A landlord who is owed four months of rent still cannot change the locks. A roommate situation that has gone sour, a lease that expired last year, a handshake arrangement with no paperwork at all - none of it converts self-help into a legal remedy in New York City.
The lawful path runs through Housing Court: the owner brings a proceeding, the occupant gets notice and a chance to answer, and if the owner wins, the court issues a warrant of eviction that a New York City marshal executes after the required notice. No marshal, no court order, no lawful eviction - and a landlord, managing agent, super, or locksmith acting on their instructions has no authority to shortcut it.
New York City Administrative Code section 26-521, the unlawful eviction law, spells out what is prohibited: using or threatening force against the occupant, removing their possessions, removing the entrance door, removing or changing the lock or plugging the cylinder, and cutting off essential services such as heat, water, gas, or electricity to drive someone out. State law also makes unlawful eviction of a lawful occupant a crime. This is not only a civil dispute between a tenant and an owner - it carries criminal exposure for the person who does it.
The protection is broader than most people assume, and it does not depend on having a signed lease. Under the city's unlawful eviction law, you are covered if any of the following is true:
Whether rent is current, whether your name is on the lease, and whether the owner thinks you are a problem are separate questions - argued in court, not settled with a drill and a new cylinder. The practical consequence: most New Yorkers locked out by a landlord, a head tenant, or a relative are protected and do not realize it.
This article is general information, not legal advice. For advice about your own situation, speak with a housing attorney or a tenant legal services provider.

You are standing in a hallway, your key does not fit, and nobody is answering the buzzer. Work through this in order.
Everything downstream - the police response, a Housing Court petition, a locksmith deciding whether they can work on your door - turns on whether you can show the unit is yours. The documents that carry weight are ordinary ones:
If your documents are inside the apartment - which is the usual cruelty of a lockout - banks, employers, and government agencies can reissue or email copies, and digital copies count. Our guide to what ID a locksmith needs for an apartment lockout covers the same evidence from the locksmith's side of the door.
There are two routes back into the unit, and they are not alternatives so much as a sequence.
The police route is the fast one. Officers who are satisfied that you live in the apartment and that no court-ordered eviction took place can direct the landlord to restore your access on the spot. Responses vary by precinct and by how clear the evidence is, so bring the documents and stay calm and factual. If officers conclude it is a civil matter and decline to act, ask for the complaint or incident number before they leave - that record matters later.
The court route is the durable one. New York City Housing Court hears illegal lockout proceedings, in which an occupant put out without legal process asks to be restored to possession. These cases move quickly relative to ordinary litigation, and free or low-cost legal help is available to many New Yorkers.
A locksmith is part of this only in specific circumstances. If the police or a court have directed that you be restored to the unit, or the landlord agrees to give you access back and the cylinder needs to be opened or changed, a licensed locksmith does that work. What a locksmith cannot do is decide a housing dispute at the door.
We work across Brooklyn, Manhattan, Queens, the Bronx, and Staten Island, 24 hours a day. Bring proof of residency, or have the owner or managing agent authorise the work, and we will handle the cylinder properly.
Licensed locksmiths in New York City work under a straightforward rule: open or change a lock only for someone with a demonstrable right to that door. In practice that means:
If a locksmith offers to open an occupied apartment for a landlord with no questions asked, that tells you what else they are willing to do. The same pattern shows up in the locksmith scams that operate in NYC.
The law is not a blanket prohibition, and knowing the exceptions keeps this honest:
Co-op and condo buildings add a layer of house rules on top of all this, and those rules govern things like whether the managing agent must hold a key. Changing locks in a co-op versus a condo sets out how that works.
Self-help lockouts are the most expensive way to deal with an unwanted occupant in New York City: criminal and civil exposure, a likely order restoring the occupant to the apartment, and the court proceeding you were trying to avoid still waiting for you. Where lock work is legitimate - turnover between tenants, a building rekey, key control across a portfolio - that is ordinary locksmith work, covered in master key systems for NYC buildings and who pays for a locksmith.
Call 911 to report an illegal lockout in progress and 311 for tenant help, harassment complaints, and referrals to the responsible city agencies. Illegal lockout proceedings are filed in New York City Housing Court, and every borough has a help centre for people without a lawyer. The city also funds free and low-cost tenant representation; 311 and the Housing Court help centres will point you to the provider covering your area.
No, not on an occupied unit. If you have lived there 30 consecutive days or more, or you entered under a lease or rental agreement, the only lawful way to remove you is a court proceeding ending in a warrant of eviction executed by a city marshal. Changing the cylinder, plugging the keyway, or removing the door is an unlawful eviction under the New York City Administrative Code.
The protection still applies. The 30-day rule covers occupants with no written lease at all, including roommates, family members, and people whose lease expired. Unpaid rent is a reason to bring a case in Housing Court; it is not permission to change the locks. Those arguments get decided by a judge, not at the door.
Often, yes. Report it as an illegal lockout rather than a dispute, and bring proof that you live there - ID with the address, a lease, rent receipts, or mail. Officers satisfied that no court-ordered eviction took place can direct the landlord to restore access. If they treat it as a civil matter, ask for the incident number and take it to Housing Court.
A licensed locksmith can open a door for someone who shows a right to be there, but a lockout dispute is not settled at the door. We ask for ID and proof of residency before any work, and we will not open or change a lock where the right of entry is contested. The cleaner path is police or Housing Court first, locksmith second. See what ID is needed for an apartment lockout.
Removing an occupant's possessions is itself listed as unlawful eviction conduct in the city's law, so the property should not have been touched. Photograph what you can see, note what is missing, and raise it in the same police report and court filing as the lockout. Get any promise to return items in writing.
A building can rekey entrance doors or upgrade to a fob or keypad system as ordinary maintenance, but residents have to be given working keys or credentials. Changing a building lock and then withholding access from one occupant is a lockout by another route. Ask the managing agent in writing, and keep the message. If you need help once access is sorted out, call (718) 412-1332.