(1) Except as provided in this section, a landlord may not retaliate by increasing rent or decreasing services or by bringing or threatening to bring an action for possession after:
(a) The tenant has complained to a government agency charged with responsibility for enforcement of a minimum building or housing code of a violation applicable to the premises materially affecting health and safety; or
(b) The tenant has organized or become a member of a tenants' union or similar organization.
(2) If the landlord acts in violation of subsection (1), the tenant is entitled to the remedies provided in section 76-1430 and has a defense in action against him for possession. Nothing in this section shall be construed as prohibiting reasonable rent increases or changes in services notwithstanding the occurrence of acts specified in subsection (1).
(3) Notwithstanding subsections (1) and (2), a landlord may bring an action for possession if:
(a) The violation of the applicable minimum building or housing code was caused primarily by lack of reasonable care by the tenant or other person in his household or upon the premises with his consent;
(b) The tenant is in default in rent; or
(c) Compliance with the applicable minimum building or housing code requires alteration, remodeling, or demolition which would effectively deprive the tenant of use of the dwelling unit.
The maintenance of the action does not release the landlord from liability under subsection (2) of section 76-1425.