Finding out that your apartment building is being foreclosed on -- for whatever reason -- can be a confusing and stressful time for any renter in New York City.

Maybe you've heard rumblings in your hallway, or maybe you've received a notice on your door telling you that everything you know about your living situation may soon change; regardless, there are important facts to know when it comes to protecting your rights as a tenant. 

From building maintenance to potential eviction scenarios, here is what you need to know.

What is the notice that was posted on my building’s door mean?

First, the bank must notify all tenants that the building is being foreclosed on, according to the New York State Department of Financial Services. The bank is required to include its name, address and contact information on all notices. Most banks will post fliers around the inside and outside of the building as a way of giving notice to tenants. However, if you live in a building with less than five units, the bank must deliver the foreclosure notice directly to each tenant by certified first-class mail, according to DFS.

What if I am named as a defendant on a foreclosure, but I don’t own the building?

A bank may name each tenant as a defendant in the foreclosure, but in most cases, this is simply a way to ensure tenants are aware of the foreclosure proceedings, according to the Department of Financial Services.

Do I still pay rent during a foreclosure? If so, who do I pay?

While the foreclosure is taking place, you are still subject to the terms agreed upon in your lease, including paying rent to your landlord. However, this may change if a receiver is appointed, at which time you would be notified and can begin to pay rent to the receiver based on information provided by them, according to the Department of Financial Services.

Does my landlord need to maintain the building during foreclosure?

Yes, your landlord is still required to maintain the property until the foreclosure is complete.

I received a notice that I have a new landlord. Can I be evicted?

There are several scenarios that can happen after a new owner takes possession of the property, and much of what can happen depends on the type of housing that you are renting. In all scenarios, attorney Justin Brasch, of The Law Offices of Justin C. Brasch, says a new building owner is still required to honor lease agreements made between the previous landlord and tenants.

If you live in a rent-controlled or rent-stabilized apartment, the new owner can only evict a tenant if the owner intends to occupy that individual unit as his or her primary residence. If your new landlord does choose to take up residence in your unit, he or she must provide notice at least 90 days before the eviction date, according to the Department of Financial Services. Otherwise, the tenant has the right to a lease renewal.

Tenants in Section 8 housing can only be evicted “for serious or repeated violations of the terms and conditions of the lease, for violation of applicable federal, state, or local law, or for other good cause,” according to the state Department of Financial Services. A simple foreclosure or change of ownership is not enough to evict tenants, according to the Department of Financial Services. However, the same primary residence exception for rent-controlled apartments also applies for Section 8 housing.

If you live in a non-regulated unit and the new landlord intends to evict, you have until the end of your lease agreement or 90 days after you receive notice that the foreclosure was completed before eviction proceedings can begin, whichever is greater, according to the Department of Financial Services. If you don’t have an active lease, for example if your lease expired during the foreclosure process, you can remain in the apartment for up to 90 days and continue to pay the same rent amount that you were paying under the previous ownership before your new landlord can begin eviction. Unlike regulated apartments in New York City, a new building owner in this instance is not obligated to offer a lease renewal to any tenants.

Can a new landlord raise rent while I still have a lease from my old landlord?

According to Brasch, a new building owner cannot raise rent while you have an active lease with your previous landlord. "The current leases would govern the landlord-tenant relationships," Brasch said.

How can I confirm that the new landlord of my building is the legitimate owner?

Brasch suggested several ways in which you may be able to confirm rightful ownership after a foreclosure. First, you could ask the new landlord for proof of ownership with a copy of the certified deed for the property. While you could also seek out the Supreme Court file for the foreclosure, ultimately “the new deed will be filed online and you could check New York City’s ACRIS to find out who owns the property,” Brasch said. ACRIS, which stands for Automated City Register Information System, is run by the Office of the City Register. ACRIS also allows you to sign up for an alert when documents related to your building have been added or updated.

What should I do if I believe my rights as a tenant are being violated?

The first thing you can do is consult with a lawyer. If you do not think you can afford a lawyer, check with the Legal Aid Society office in your area to see if you qualify for free legal assistance.