2023 California Code › Code of Civil Procedure - CCP › PART 3 - OF SPECIAL PROCEEDINGS OF A CIVIL NATURE › TITLE 3 - OF SUMMARY PROCEEDINGS › CHAPTER 4 - Summary Proceedings for Obtaining Possession of Real Property in Certain Cases › Section 1174.27.

1174.27. (a) This section shall apply to an unlawful detainer proceeding in which all of the following are true:
(1) The proceeding involves a residential premises.
(2) The complaint includes a cause of action based on an act of abuse or violence against a tenant, a tenant’s immediate family member, or a tenant’s household member.
(3) A defendant has invoked paragraph (2) of subdivision (d) of Section 1161.3 as an affirmative defense to the cause of action described in paragraph (2).
(b) For the purposes of this section, the definitions in subdivision (a) of Section 1161.3 apply.
(c) The court shall determine whether there is documentation evidencing abuse or violence against the tenant, the tenant’s immediate family member, or the tenant’s household member.
(d) If the court determines there is not documentation evidencing abuse or violence against the tenant, the court shall deny the affirmative defense.
(e) If the court determines that there is documentation evidencing abuse or violence against the tenant, the tenant’s immediate family member, or the tenant’s household member, and the court does not find the defendant raising the affirmative defense guilty of an unlawful detainer on any other grounds, then both of the following:
(1) The defendant raising the affirmative defense and any other occupant not found guilty of an unlawful detainer shall not be guilty of an unlawful detainer and shall not be named in any judgment in favor of the landlord.
(2) The defendant raising the affirmative defense and any other occupant not found guilty of an unlawful detainer shall not be held liable to the landlord for any amount related to the unlawful detainer, including, but not limited to, holdover damages, court costs, lease termination fees, or attorney’s fees.
(f) (1) If the court makes the determination described in subdivision (e), upon a showing that any other defendant was the perpetrator of the abuse or violence on which the affirmative defense was based and is guilty of an unlawful detainer, the court shall do both of the following:
(A) Issue a partial eviction ordering the removal of the perpetrator of abuse or violence and ordering that person be immediately removed and barred from the dwelling unit, but the court shall not order the tenancy terminated.
(B) Order the landlord to change the locks and to provide the remaining occupants with the new key.
(2) If a court issues a partial eviction order as described in subparagraph (A) of paragraph (1), then only a defendant found guilty of an unlawful detainer may be liable for holdover damages, court costs, lease termination fees, or attorney’s fees, as applicable.
(3) If the court makes the determination described in subdivision (e), the court may, upon a showing that any other defendant was the perpetrator of the abuse or violence on which the affirmative defense was based and is guilty of an unlawful detainer, do any of the following:
(A) Permanently bar the perpetrator of abuse or violence from entering any portion of the residential premises.
(B) Order as an express condition of the tenancy that the remaining occupants shall not give permission to or invite the perpetrator of abuse or violence to live in the dwelling unit.
(4) In exercising its discretion under this subdivision, the court shall take into account custody or visitation orders or arrangements and any other factor that may necessitate the temporary reentry of the perpetrator of abuse or violence.
(g) The Judicial Council shall develop a judgment form for use in a ruling pursuant to subdivision (e) or (f).
(h) Notwithstanding any other law, a determination that a person is a perpetrator of abuse or violence under subdivision (e) or (f) shall not constitute a finding that the person is a perpetrator of abuse or violence for any other purposes and shall not be admissible as evidence that the person committed a crime or is a perpetrator of abuse or violence in any other proceeding, including, but not limited to, a civil action or proceeding, a criminal action or proceeding, and a proceeding involving a juvenile for a criminal offense.
(Added by Stats. 2022, Ch. 558, Sec. 3. (SB 1017) Effective January 1, 2023.)