1. Notwithstanding section 561.15, if it is alleged by a person authorized to file a petition under section 232.87, subsection 2, or by the court on its own motion, that a parent, guardian, custodian, or an adult member of the household in which a child resides has committed a sexual offense with or against the child, pursuant to chapter 709 or section 726.2, or physical abuse as defined in section 232.2, subsection 47, or domestic abuse assault as defined in section 708.2A, against the child or another household member at a location or in a manner a reasonably prudent person would know the child could see, hear, or otherwise experience, the juvenile court may enter an ex parte order requiring the alleged sexual offender, physical abuser, or domestic abuser to vacate the child’s residence upon a showing that probable cause exists to believe that the sexual offense, physical abuse, or domestic abuse has occurred and that substantial evidence exists to believe that the presence of the alleged sexual offender, physical abuser, or domestic abuser in the child’s residence presents a danger to the child’s life or physical, emotional, or mental health.
 2. If an order is entered under subsection 1 and a petition has not yet been filed under this chapter, the petition shall be filed under section 232.87 by the county attorney, the department of human services, or a juvenile court officer within three days of the entering of the order.
 3. The juvenile court may order on its own motion, or shall order upon the request of the alleged sexual offender, physical abuser, or domestic abuser a hearing to determine whether the order to vacate the residence should be upheld, modified, or vacated. The hearing shall be held within thirty days of removal of the alleged sexual offender, physical abuser, or domestic abuser from the residence. The juvenile court may in any later child in need of assistance proceeding uphold, modify, or vacate the order to vacate the residence.