37.2-844 - Habeas corpus as means.

§ 37.2-844. Habeas corpus as means.

A. Any person held in custody because of his mental illness may by petitionfor a writ of habeas corpus have the question of the legality of hisdetention determined by a court of competent jurisdiction. Upon the petition,after notice to the authorities of the facility or other institution in whichthe person is confined, the court shall determine in a courtroom of thecounty or city or in some other convenient public place in that county orcity, whether the person has a mental illness and whether he should bedetained.

B. Any proceeding to challenge the continued secure inpatient treatment of aperson held in custody as a sexually violent predator under Chapter 9 (§37.2-900 et seq.) of this title shall be conducted in accordance with §37.2-910.

(Code 1950, §§ 37-122, 37-123; 1950, p. 916; 1968, c. 477, § 37.1-103; 1976,c. 671; 2003, cc. 989, 1018; 2005, c. 716.)