A cause of action may arise in favor of a lessee and against a lessor of residential property, including a manufactured or mobile home community owner, for retaliation by the lessor against the lessee if the lessor increases rents above fair market value; if the lessor decreases electric, gas, water, or sewer services; or if the lessor gives the lessee notice to vacate the premises when such notice is not based upon a breach of the terms of the lease; subsequent to any of the following special events:
It shall be a defense to this cause of action that the notice to vacate the premises was given by the lessor more than one hundred eighty days after the occurrence of a special event. The failure of the lessor to renew any written lease prior to or upon its expiration, is not retaliation.
SDCL 43-32-27