(b) In the event the tenant counterclaims, the court at the landlord’s or tenant’s request 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 shall be paid the balance by the other party. The court may at any time release money paid into court to either party if the parties agree or if the court finds such party to be entitled to the sum so released. If no rent remains due after application of this section and unless otherwise agreed between the parties, a judgment shall be entered for the tenant in the action for possession.
(2) In an action for rent when the tenant is not in possession, the tenant may counterclaim as provided in subsection (1) of this section but is not required to pay any rent into court.
(3) If the tenant does not comply with an order to pay rent into the court as provided in subsection (1) of this section, the tenant shall not be permitted to assert a counterclaim in the action for possession.
(4) If the total amount found due to the tenant on any counterclaims is less than any rent found due to the landlord, and the tenant retains possession solely because the tenant paid rent into court under subsection (1) of this section, no attorney fees shall be awarded to the tenant unless the tenant paid at least the balance found due to the landlord into court no later than the commencement of the trial.
(5) When a tenant is granted a continuance for a longer period than two days, and has not been ordered to pay rent into court under subsection (1) of this section, the tenant shall be ordered to pay rent into court under ORS 105.140 (2). [Formerly 91.810; 1993 c.369 §9; 1995 c.559 §22]