(a) When a person is arrested for a crime against the person, the judge before whom the arrested person is taken shall review the facts surrounding the arrest and detention. If the person was arrested or detained for committing a crime of violence, as defined in section 629.725, the prosecutor or other appropriate person shall present relevant information involving the victim or the victim's family's account of the alleged crime to the judge to be considered in determining the arrested person's release. The arrested person must be ordered released pending trial or hearing on the person's personal recognizance or on an order to appear or upon the execution of an unsecured bond in a specified amount unless the judge determines that release (1) will be inimical to public safety, (2) will create a threat of bodily harm to the arrested person, the victim of the alleged crime, or another, or (3) will not reasonably assure the appearance of the arrested person at subsequent proceedings.
(b) If the judge determines release under paragraph (a) is not advisable, the judge may impose any conditions of release that will reasonably assure the appearance of the person for subsequent proceedings, or will protect the victim of the alleged crime, or may fix the amount of money bail without other conditions upon which the arrested person may obtain release.
The judge may order as a condition of release that the person surrender to the local law enforcement agency all firearms, destructive devices, or dangerous weapons owned or possessed by the person, and may not live in a residence where others possess firearms. Any firearm, destructive device, or dangerous weapon surrendered under this subdivision shall be inventoried and retained, with due care to preserve its quality and function, by the local law enforcement agency, and must be returned to the person upon the person's acquittal, when charges are dismissed, or if no charges are filed. If the person is convicted, the firearm must be returned when the court orders the return or when the person is discharged from probation and restored to civil rights. If the person is convicted of a designated offense as defined in section 609.531, the firearm is subject to forfeiture as provided under that section. This condition may be imposed in addition to any other condition authorized by rule 6.02 of the Rules of Criminal Procedure.
If conditions of release are imposed, the judge shall issue a written order for conditional release. The court administrator shall immediately distribute a copy of the order for conditional release to the agency having custody of the arrested person and shall provide the agency having custody of the arrested person with any available information on the location of the victim in a manner that protects the victim's safety. Either the court or its designee or the agency having custody of the arrested person shall serve upon the defendant a copy of the order. Failure to serve the arrested person with a copy of the order for conditional release does not invalidate the conditions of release.
If the judge imposes as a condition of release a requirement that the person have no contact with the victim of the alleged crime, the judge may also, on its own motion or that of the prosecutor or on request of the victim, issue an ex parte temporary restraining order under section 609.748, subdivision 4, or an ex parte temporary order for protection under section 518B.01, subdivision 7. Notwithstanding section 518B.01, subdivision 7, paragraph (b), or 609.748, subdivision 4, paragraph (c), the temporary order is effective until the defendant is convicted or acquitted, or the charge is dismissed, provided that upon request the defendant is entitled to a full hearing on the restraining order under section 609.748, subdivision 5, or on the order for protection under section 518B.01. The hearing must be held within seven days of the defendant's request.