A. 1. A petition for a writ of habeas corpus ad subjiciendum may be filed in the Supreme Court or any circuit court showing by affidavits or other evidence that the petitioner is detained without lawful authority.
2. A petition for writ of habeas corpus ad subjiciendum, other than a petition challenging a criminal conviction or sentence, shall be brought within one year after the cause of action accrues. A habeas corpus petition attacking a criminal conviction or sentence shall be filed within two years from the date of final judgment in the trial court or within one year from either final disposition of the direct appeal in state court or the time for filing such appeal has expired, whichever is later.
B. 1. With respect to any such petition filed by a petitioner whose detention originated under criminal process, and subject to the provisions of § 17.1-310, only the circuit court that entered the original judgment or order resulting in the detention complained of in the petition shall have authority to issue writs of habeas corpus. If a district court entered the original judgment or order resulting in the detention complained of in the petition, only the circuit court for the city or county wherein the district court sits shall have authority to issue writs of habeas corpus. Hearings on such petition, where granted in the circuit court, may be held at any circuit court within the same circuit as the circuit court in which the petition was filed, as designated by the judge thereof.
2. Such petition shall contain all allegations the facts of which are known to petitioner at the time of filing and such petition shall enumerate all previous applications and their disposition. No writ shall be granted on the basis of any allegation the facts of which petitioner had knowledge at the time of filing any previous petition. The provisions of this section shall not apply to a petitioner's first petition for a writ of habeas corpus when the sole allegation of such petition is that the petitioner was deprived of the right to pursue an appeal from a final judgment of conviction or probation revocation, except that such petition shall contain all facts pertinent to the denial of appeal that are known to the petitioner at the time of the filing, and such petition shall certify that the petitioner has filed no prior habeas corpus petitions attacking the conviction or probation revocation.
3. Such petition may allege detention without lawful authority through challenge to a conviction, although the sentence imposed for such conviction is suspended or is to be served subsequently to the sentence currently being served by petitioner.
4. In the event the allegations of illegality of the petitioner's detention can be fully determined on the basis of recorded matters, the court may make its determination whether such writ should issue on the basis of the record.
5. The court shall give findings of fact and conclusions of law following a determination on the record or after hearing, to be made a part of the record and transcribed.
6. If petitioner alleges as a ground for illegality of his detention the inadequacy of counsel, he shall be deemed to waive his privilege with respect to communications between such counsel and himself to the extent necessary to permit a full and fair hearing for the alleged ground.
Code 1950, § 8-596; 1958, c. 215; 1968, c. 487; 1977, c. 617; 1978, c. 124; 1995, c. 503; 1998, c. 577; 2005, c. 836; 2019, cc. 8, 48; 2021, Sp. Sess. I, cc. 344, 345.
Structure Code of Virginia
Title 8.01 - Civil Remedies and Procedure
Chapter 25 - Extraordinary Writs
§ 8.01-636. In what cases writ issued
§ 8.01-637. By whom filed; when leave granted and writ issued
§ 8.01-639. How summons directed and served
§ 8.01-640. Judgment when defendant fails to appear
§ 8.01-641. Reopening same when made on service by publication
§ 8.01-642. Pleading when defendant appears
§ 8.01-643. Trial; verdict; judgment; costs; attorney's fee
§ 8.01-644. Application for mandamus or prohibition
§ 8.01-644.1. Limitations of actions for petition for mandamus
§ 8.01-645. What petition to state; where presented
§ 8.01-646. When writ awarded if no defense made
§ 8.01-648. What judgment to be rendered
§ 8.01-649. Proceedings when application is to Supreme Court or Court of Appeals
§ 8.01-650. Suspension of proceedings, where prohibition applied for
§ 8.01-651. Suspension of proceedings by justice of Supreme Court or judge of Court of Appeals
§ 8.01-652. Service of writ; how obedience enforced
§ 8.01-654. When and where petition filed; what petition to contain
§ 8.01-655. Form and contents of petition filed by prisoner
§ 8.01-658. When and from whom response required; dismissal of habeas petition without prejudice
§ 8.01-660. When affidavits may be read
§ 8.01-661. Facts proved may be made part of record
§ 8.01-662. Judgment of court or judge trying it; payment of costs and expenses when petition denied
§ 8.01-663. Judgment conclusive
§ 8.01-664. How and when Supreme Court summoned to try appeal therefrom
§ 8.01-665. When execution of judgment suspended; when prisoner admitted to bail
§ 8.01-666. When and by whom writs of habeas corpus ad testificandum granted