To use this form, you must be a person who is or will be serving a sentence under a judgment against you in a state court. 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.The writ of habeas corpus in Virginia requires a probable cause standard of proof. These instructions and forms are provided to those who seek to petition the Supreme. Habeas corpus is perhaps the most critical writ available to prisoners for challenging criminal convictions and sentences in state and federal courts. Federal prisoners in US Marshals custody may lawfully be transferred to the custody of a state or local government pursuant to a state writ of ad prosequendum. Generally, anyone detained or imprisoned can file a petition for a writ of habeas corpus in the United States. This petition, called a writ of Habeas Corpus, is filed in Federal Court (US District Court ) whether you are serving time in a federal or state prison.