{"formats":[{"name":"JSON","format":"json","url":"\/downloads\/2025\/code-json\/37.2-845.json"},{"name":"Plain Text","format":"text","url":"\/downloads\/2025\/code-text\/37.2-845.txt"},{"name":"XML","format":"xml","url":"\/downloads\/2025\/code-xml\/37.2-845.xml"},{"name":"HTML","format":"html","url":"\/downloads\/2025\/code-html\/37.2-845.html"}],"law_id":77022,"edition_id":1,"section_id":77022,"structure_id":12891,"section_number":"37.2-845","catch_line":"Procedure when person confined in facility or other institution","history":"Code 1950, \u00a7 37-123; 1950, p. 916; 1968, c. 477, \u00a7 37.1-104; 1976, c. 671; 2003, cc. 989, 1018; 2005, c. 716.","full_text":"A\n\nIf the person referenced in &#xA7; 37.2-844 is held in custody and actually confined in any facility or other institution, he may file his petition in the circuit court of the county or the city in which the facility or other institution is located or in the circuit court of the county or the city adjoining the county or city in which the facility or other institution is located.B\n\nAny proceeding to challenge the continued secure inpatient treatment of any person held in custody as a sexually violent predator under Chapter 9 (&#xA7; 37.2-900 et seq.) of this title shall be conducted in the circuit court wherein the person was last convicted of a sexually violent offense or wherein the defendant was deemed unrestorably incompetent and referred for commitment pursuant to &#xA7; 19.2-169.3.","order_by":null,"text":{"0":{"id":276408,"text":"If the person referenced in &#xA7; 37.2-844 is held in custody and actually confined in any facility or other institution, he may file his petition in the circuit court of the county or the city in which the facility or other institution is located or in the circuit court of the county or the city adjoining the county or city in which the facility or other institution is located.","type":"section","prefixes":["A"],"prefix":"A","entire_prefix":"A","prefix_anchor":"A","level":1,"next_prefix":"B"},"1":{"id":276409,"text":"Any proceeding to challenge the continued secure inpatient treatment of any person held in custody as a sexually violent predator under Chapter 9 (&#xA7; 37.2-900 et seq.) of this title shall be conducted in the circuit court wherein the person was last convicted of a sexually violent offense or wherein the defendant was deemed unrestorably incompetent and referred for commitment pursuant to &#xA7; 19.2-169.3.","type":"section","prefixes":["B"],"prefix":"B","entire_prefix":"B","prefix_anchor":"B","level":1,"prior_prefix":"A"}},"ancestry":[{"id":12891,"edition_id":1,"name":"Testing Legality of Detention","identifier":"8","label":"article","depth":4,"order_by":1,"parent_id":12890,"metadata":{},"date_created":"2026-06-26 03:43:59","date_modified":"2026-06-26 03:43:59","permalink":{"id":210485,"object_type":"structure","relational_id":12891,"identifier":"8","token":"37.2\/III\/8\/8","url":"\/37.2\/III\/8\/8\/","edition_id":1,"permalink":0,"preferred":1}},{"id":12890,"edition_id":1,"name":"Emergency Custody and Voluntary and Involuntary Civil Admissions","identifier":"8","label":"chapter","depth":3,"order_by":1,"parent_id":12889,"metadata":{},"date_created":"2026-06-26 03:43:59","date_modified":"2026-06-26 03:43:59","permalink":{"id":210257,"object_type":"structure","relational_id":12890,"identifier":"8","token":"37.2\/III\/8","url":"\/37.2\/III\/8\/","edition_id":1,"permalink":0,"preferred":1}},{"id":12889,"edition_id":1,"name":"Admissions and Dispositions","identifier":"III","label":"subtitle","depth":2,"order_by":1,"parent_id":12843,"metadata":{},"date_created":"2026-06-26 03:43:59","date_modified":"2026-06-26 03:43:59","permalink":{"id":210255,"object_type":"structure","relational_id":12889,"identifier":"III","token":"37.2\/III","url":"\/37.2\/III\/","edition_id":1,"permalink":0,"preferred":1}},{"id":12843,"edition_id":1,"name":"Behavioral Health and Developmental Services","identifier":"37.2","label":"title","depth":1,"order_by":1,"parent_id":null,"metadata":{},"date_created":"2026-06-26 03:43:56","date_modified":"2026-06-26 03:43:56","permalink":{"id":209673,"object_type":"structure","relational_id":12843,"identifier":"37.2","token":"37.2","url":"\/37.2\/","edition_id":1,"permalink":0,"preferred":1}}],"structure_contents":[{"id":70993,"structure_id":12891,"section_number":"37.2-844","catch_line":"Habeas corpus as means","url":"\/37.2-844\/","token":"37.2\/III\/8\/8\/37.2-844","metadata":false},{"id":77022,"structure_id":12891,"section_number":"37.2-845","catch_line":"Procedure when person confined in facility or other institution","url":"\/37.2-845\/","token":"37.2\/III\/8\/8\/37.2-845","metadata":false},{"id":54012,"structure_id":12891,"section_number":"37.2-846","catch_line":"Procedure when person not confined in facility or other institution","url":"\/37.2-846\/","token":"37.2\/III\/8\/8\/37.2-846","metadata":false},{"id":82613,"structure_id":12891,"section_number":"37.2-847","catch_line":"Duty of attorney for Commonwealth","url":"\/37.2-847\/","token":"37.2\/III\/8\/8\/37.2-847","metadata":false}],"previous_section":{"id":70993,"structure_id":12891,"section_number":"37.2-844","catch_line":"Habeas corpus as means","url":"\/37.2-844\/","token":"37.2\/III\/8\/8\/37.2-844","metadata":false},"next_section":{"id":54012,"structure_id":12891,"section_number":"37.2-846","catch_line":"Procedure when person not confined in facility or other institution","url":"\/37.2-846\/","token":"37.2\/III\/8\/8\/37.2-846","metadata":false},"metadata":false,"official_url":"https:\/\/law.lis.virginia.gov\/vacode\/37.2-845\/","history_text":"<p>The record of this law\u2019s original creation isn\u2019t available online. It has been modified 4 times. Those modifications are cataloged by \u201cThe Acts of Assembly,\u201d a state publication, by year and chapter. Those modifications that can be read on the General Assembly\u2019s website will be linked accordingly. Those modifications are as follows: in 1968, chapter 477; in 1976, chapter 671; in 2003, chapters <a href=\"https:\/\/legacylis.virginia.gov\/cgi-bin\/legp604.exe?031+ful+CHAP0989\">989<\/a> and <a href=\"https:\/\/legacylis.virginia.gov\/cgi-bin\/legp604.exe?031+ful+CHAP1018\">1018<\/a>; in 2005, chapter <a href=\"https:\/\/legacylis.virginia.gov\/cgi-bin\/legp604.exe?051+ful+CHAP0716\">716<\/a>.<\/p>","references":[{"id":54012,"section_number":"37.2-846","catch_line":"Procedure when person not confined in facility or other institution","order_by":null,"url":"\/37.2-846\/"}],"refers_to":[{"id":80703,"section_number":"19.2-169.3","catch_line":"Disposition of the unrestorably incompetent defendant; aggravated murder charge; sexually violent offense charge","order_by":null,"url":"\/19.2-169.3\/"},{"id":70993,"section_number":"37.2-844","catch_line":"Habeas corpus as means","order_by":null,"url":"\/37.2-844\/"},{"id":55224,"section_number":"37.2-900","catch_line":"Definitions","order_by":null,"url":"\/37.2-900\/"}],"permalink":{"id":210491,"object_type":"law","relational_id":77022,"identifier":"37.2-845","token":"37.2\/III\/8\/8\/37.2-845","url":"\/37.2-845\/","edition_id":1,"permalink":0,"preferred":1},"url":"\/37.2-845\/","token":"37.2\/III\/8\/8\/37.2-845","dublin_core":{"Title":"Procedure when person confined in facility or other institution","Type":"Text","Format":"text\/html","Identifier":"\u00a7 37.2-845","Relation":"Code of Virginia"},"html":"\n\t\t\t\t\t\t<section id=\"A\"><p><span class=\"prefix-number\">A.<\/span> If the person referenced in &#xA7; <a class=\"law\" title=\"Habeas corpus as means\" href=\"\/37.2-844\/\">37.2-844<\/a> is held in <span class=\"dictionary\">custody<\/span> and actually confined in any <span class=\"dictionary\">facility<\/span> or other institution, he 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 the <span class=\"dictionary\">facility<\/span> or other institution is located or in the <span class=\"dictionary\">circuit<\/span> <span class=\"dictionary\">court<\/span> of the county or the city adjoining the county or city in which the <span class=\"dictionary\">facility<\/span> or other institution is located. <a id=\"paragraph-276408\" class=\"section-permalink\" href=\"https:\/\/vacode.org\/37.2-845\/#A\"><i class=\"fa fa-link\"><\/i><\/a><\/p><\/section>\n\t\t\t\t\t\t<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-276409\" class=\"section-permalink\" href=\"https:\/\/vacode.org\/37.2-845\/#B\"><i class=\"fa fa-link\"><\/i><\/a><\/p><\/section>","plain_text":"                                 CODE OF VIRGINIA\n\nPROCEDURE WHEN PERSON CONFINED IN FACILITY OR OTHER INSTITUTION (\u00a7 37.2-845)\n\nA. If the person referenced in &#xA7; 37.2-844 is held in custody and actually\nconfined in any facility or other institution, he may file his petition in the\ncircuit court of the county or the city in which the facility or other\ninstitution is located or in the circuit court of the county or the city\nadjoining the county or city in which the facility or other institution is\nlocated.\n\nB. Any proceeding to challenge the continued secure inpatient treatment of any\nperson held in custody as a sexually violent predator under Chapter 9 (&#xA7;\n37.2-900 et seq.) of this title shall be conducted in the circuit court wherein\nthe person was last convicted of a sexually violent offense or wherein the\ndefendant was deemed unrestorably incompetent and referred for commitment\npursuant to &#xA7; 19.2-169.3.\n\nHISTORY: Code 1950, \u00a7 37-123; 1950, p. 916; 1968, c. 477, \u00a7 37.1-104; 1976, c.\n671; 2003, cc. 989, 1018; 2005, c. 716.","edition":{"id":1,"name":"2025","slug":"2025","date_created":"2026-06-21 22:39:22","date_modified":"2026-06-21 22:39:22","current":1,"order_by":1,"last_import":null}}