§ 34-18-32 Landlord's noncompliance as defense to action for possession or rent.
(a) In an action for possession based upon nonpayment of rent or in an action for rent when the tenant is in possession, the tenant may counterclaim for any amount he or she may recover under the rental agreement or this chapter. In that event, the court, from time to time, may order the tenant to pay into court all or part of the rent accrued and thereafter accruing, and shall determine the amount due to each party. The party to whom a net amount is owed shall be paid first from the money paid into court, and the balance by the other party. If no rent remains due after application of this section, judgment shall be entered for the tenant in the action for possession. If the defense or counterclaim by the tenant is frivolous or without any basis in fact, the landlord may recover reasonable attorney's fees.
(b) In an action for rent when the tenant is not in possession, he or she may counterclaim as provided in subsection (a) of this section, but is not required to pay any rent into court.
(P.L. 1986, ch. 200, § 2.)