The writ of habeas corpus is the fundamental instrument for safeguarding individual freedom against arbitrary and lawless government action. 2. The writ of habeas corpus primarily acts as a writ of inquiry, issued to test the reasons or grounds for restraint and detention.Habeas corpus is available to prisoners challenging their convictions and sentences. If you are filing this petition in the superior court, you only need to file the original unless local rules require additional copies. In a petition for habeas corpus, a prisoner (or another interested party) raises doubts about the legality of his or her imprisonment. Generally, an individual seeking to challenge his or her criminal conviction through a habeas petition must do so in a "timely fashion. If the petitioner loses in the superior court, he or she must file a new petition for writ of habeas corpus in the court of appeal. If you want information about federal habeas corpus, send a request to Prison Law Office, General Delivery, San. The court must rule on a petition for writ of habeas corpus within 60 days after the petition is filed. The Habeas Corpus petition claims the arrest, sentence, or trial violated constitutional law, making imprisonment unlawful.