{"data":{"id":"us-va/va.-code-37.2-844","jurisdiction":"us-va","citation":"Va. Code § 37.2-844","heading":"Habeas corpus as means","body":"A. Any person held in custody because of his mental illness may by petition for a writ of habeas corpus have the question of the legality of his detention determined by a court of competent jurisdiction. Upon the petition, after notice to the authorities of the facility or other institution in which the person is confined, the court shall determine in a courtroom of the county or city or in some other convenient public place in that county or city, whether the person has a mental illness and whether he should be detained.B. Any proceeding to challenge the continued secure inpatient treatment of a person 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.","path":["Title 37.2. BEHAVIORAL HEALTH AND DEVELOPMENTAL SERVICES","Subtitle III. Admissions and Dispositions","Chapter 8. EMERGENCY CUSTODY AND VOLUNTARY AND INVOLUNTARY CIVIL ADMISSIONS","Article 8. TESTING LEGALITY OF DETENTION"],"source_url":"https://law.lis.virginia.gov/vacode/37.2-844/","current_through":"9/4/2026","vintage":"","retrieved_at":"2026-09-04T15:15:59Z","sha256":"6f7b9d7bfb2ee4c7e88ddc0566fd16f1b06ddc9b9cf5aa8371a247e2ddddd7ba","source_id":"us-va","stale":true,"prev":"us-va/va.-code-37.2-843","next":"us-va/va.-code-37.2-845"},"notice":"GroundRules: Original legal text. Not legal advice."}
