Before commitment proceedings are instituted, the facts shall first be submitted to the county attorney, who, if satisfied that good cause exists, will prepare the petition. The county attorney may request a prepetition screening report. The petition is to be executed by a person having knowledge of the facts and filed with the district court of the county of financial responsibility, as defined in section 253B.02, subdivision 4c, or the county where the respondent is present. If the respondent is in the custody of the commissioner of corrections, the petition may be filed in the county where the conviction for which the person is incarcerated was entered.
Upon the filing of a petition alleging that a proposed respondent is a sexually dangerous person or a person with a sexual psychopathic personality, the court shall hear the petition as provided in sections 253B.07 and 253B.08.
If the court finds by clear and convincing evidence that the respondent is a sexually dangerous person or a person with a sexual psychopathic personality, the court shall commit the person to a secure treatment facility unless the person establishes by clear and convincing evidence that a less restrictive treatment program is available, is willing to accept the respondent under commitment, and is consistent with the person's treatment needs and the requirements of public safety.
After a determination that a respondent is a sexually dangerous person or a person with a sexual psychopathic personality, the court shall order commitment for an indeterminate period of time and the committed person shall be transferred, provisionally discharged, or discharged, only as provided in this chapter.
The existence in any person of a condition of a sexual psychopathic personality or the fact that a person is a sexually dangerous person shall not in any case constitute a defense to a charge of crime, nor relieve such person from liability to be tried upon a criminal charge.