<?xml version="1.0"?>
<law><site_title>Virginia Decoded</site_title><site_url>https://vacode.org</site_url><law_id>54012</law_id><section_number>37.2-846</section_number><catch_line>Procedure when person not confined in facility or other institution</catch_line><edition url="https://vacode.org/2025/" slug="2025" current="TRUE" last_updated="">2025</edition><structure><unit label="title" level="1" order_by="1" identifier="37.2">Behavioral Health and Developmental Services</unit><unit label="subtitle" level="2" order_by="1" identifier="III">Admissions and Dispositions</unit><unit label="chapter" level="3" order_by="1" identifier="8">Emergency Custody and Voluntary and Involuntary Civil Admissions</unit><unit label="article" level="4" order_by="1" identifier="8">Testing Legality of Detention</unit></structure><text>
						<section id="A"><p><span class="prefix-number">A.</span> In all cases, other than those provided for in &#xA7; <a class="law" title="Procedure when person confined in facility or other institution" href="/37.2-845/">37.2-845</a>, the person may file his <span class="dictionary">petition</span> in the <span class="dictionary">circuit</span> <span class="dictionary">court</span> of the county or the city in which he resides or in which he was found to have a <span class="dictionary">mental illness</span> or in which an <span class="dictionary">order</span> was entered authorizing his continued involuntary inpatient treatment, pursuant to Article 5 (&#xA7; <a class="law" title="(Effective July 1, 2026) Commitment hearing for involuntary admission; written explanation; right to counsel; rights of petitioner" href="/37.2-814/">37.2-814</a> et seq.) of Chapter 8 of this title. <a id="paragraph-198302" class="section-permalink" href="https://vacode.org/37.2-846/#A"><i class="fa fa-link"/></a></p></section>
						<section id="B"><p><span class="prefix-number">B.</span> Any proceeding to challenge the continued secure inpatient treatment of any person held in <span class="dictionary">custody</span> as a sexually violent predator under Chapter 9 (&#xA7; <a class="law" title="Definitions" href="/37.2-900/">37.2-900</a> et seq.) of this title shall be conducted in the <span class="dictionary">circuit</span> <span class="dictionary">court</span> wherein the person was last convicted of a sexually violent <span class="dictionary">offense</span> or wherein the <span class="dictionary">defendant</span> was deemed unrestorably incompetent and referred for commitment pursuant to &#xA7; <a class="law" title="Disposition of the unrestorably incompetent defendant; aggravated murder charge; sexually violent offense charge" href="/19.2-169.3/">19.2-169.3</a>. <a id="paragraph-198303" class="section-permalink" href="https://vacode.org/37.2-846/#B"><i class="fa fa-link"/></a></p></section></text><history>Code 1950, &#xA7; 37-124; 1950, p. 916; 1968, c. 477, &#xA7; 37.1-104.1; 1976, c. 671; 2003, cc. 989, 1018; 2005, c. 716.</history><metadata></metadata></law>
