42-37.1. Defense of retaliatory eviction.
(a) It is the public policy of the State of North Carolina to protect tenants and other persons whose residence in the household is explicitly or implicitly known to the landlord, who seek to exercise their rights to decent, safe, and sanitary housing. Therefore, the following activities of such persons are protected by law:
(1) A good faith complaint or request for repairs to the landlord, his employee, or his agent about conditions or defects in the premises that the landlord is obligated to repair under G.S. 42-42;
(2) A good faith complaint to a government agency about a landlord's alleged violation of any health or safety law, or any regulation, code, ordinance, or State or federal law that regulates premises used for dwelling purposes;
(3) A government authority's issuance of a formal complaint to a landlord concerning premises rented by a tenant;
(4) A good faith attempt to exercise, secure or enforce any rights existing under a valid lease or rental agreement or under State or federal law; or
(5) A good faith attempt to organize, join, or become otherwise involved with, any organization promoting or enforcing tenants' rights.
(b) In an action for summary ejectment pursuant to G.S. 42-26, a tenant may raise the affirmative defense of retaliatory eviction and may present evidence that the landlord's action is substantially in response to the occurrence within 12 months of the filing of such action of one or more of the protected acts described in subsection (a) of this section.
(c) Notwithstanding subsections (a) and (b) of this section, a landlord may prevail in an action for summary ejectment if:
(1) The tenant breached the covenant to pay rent or any other substantial covenant of the lease for which the tenant may be evicted, and such breach is the reason for the eviction; or
(2) In a case of a tenancy for a definite period of time where the tenant has no option to renew the lease, the tenant holds over after expiration of the term; or
(3) The violation of G.S. 42-42 complained of was caused primarily by the willful or negligent conduct of the tenant, member of the tenant's household, or their guests or invitees; or
(4) Compliance with the applicable building or housing code requires demolition or major alteration or remodeling that cannot be accomplished without completely displacing the tenant's household; or
(5) The landlord seeks to recover possession on the basis of a good faith notice to quit the premises, which notice was delivered prior to the occurrence of any of the activities protected by subsections (a) and (b) of this section; or
(6) The landlord seeks in good faith to recover possession at the end of the tenant's term for use as the landlord's own abode, to demolish or make major alterations or remodeling of the dwelling unit in a manner that requires the complete displacement of the tenant's household, or to terminate for at least six months the use of the property as a rental dwelling unit.