trial, (2) shall deny possession to the landlord and adjudge the tenant to be the prevailing party, conditioned upon the payment by the tenant of the rent that has accrued to the date of the trial as adjusted pursuant to this subdivision within a reasonable period of time not exceeding five days, from the date of the court’s judgment or, if service of the court’s judgment is made by mail, the payment shall be made within the time set forth in Section 1013, (3) may order the landlord to make repairs and correct the conditions which constitute a breach of the landlord’s obligations, (4) shall order that the monthly rent be limited to the reasonable rental value of the premises as determined pursuant to this subdivision until repairs are completed, and (5) except as otherwise provided in subdivision (b), shall award the tenant costs and attorneys’ fees if provided by, and pursuant to, any statute or the contract of the parties. If the court orders repairs or corrections, or both, pursuant to paragraph (3), the
court’s jurisdiction continues over the matter for the purpose of ensuring compliance. The court shall, however, award possession of the premises to the landlord if the tenant fails to pay all rent accrued to the date of trial, as determined due in the judgment, within the period prescribed by the court pursuant to this subdivision. The tenant shall, however, retain any rights conferred by Section 1174.
Cite this section