Dear can an illegal tenant sue?
Well. Anyone can sue. The legal issue is does that person have or is able to state a cause of action where relief may be granted. That question is always resolved in a court.
Any person occupying a residence for longer than thirty consecutive days in New York, may be legally evicted only by the process of a court proceeding. Locking a person out in New York City is a crime. Persons occupying a dwelling who are unlawfully locked out may try to gain an order from the Housing Court to restore to possession; pending the outcome of any legal proceeding for an eviction. A person forcefully evicted or locked out or forced out by threats and duress , possess a cause of action for an unlawful eviction and a court or jury may award triple damages if the locked out person prevails in a lawsuit.
If you were illegally evicted you may have a solid claim for damages in a lawsuit and you should not hesitate to hire an attorney to protect your interests.
If you are locked out and you want back in, you could avail yourself to the procedures in the Housing Part of the Civil Court to be restored to possession.
A landlord with a valid ground to bring an eviction proceeding does not need to threaten; just needs to follow the lawful procedures for commencing a summary proceeding for possession.
The answer provided to you is in the nature of general information. The general proposition being that you should try to avoid a bad outcome if you can.