Ask the court for a writ of habeas corpus (a court order telling a public official, like a prison warden, to bring you to the court and show a legal reason for holding you) to challenge your criminal conviction or commitment to another facility or the conditions under which you are being held.
State every ground (reason) that supports your claim that you are being held in violation of the Constitution, laws, or treaties of the United States. Attach additional pages if you have more than four grounds. State the facts supporting each ground. Any legal arguments must be submitted in a separate memorandum.
A writ of habeas corpus is a limited remedy whereby a person may attempt to challenge the legal basis for continuing to hold him or her in custody. If the application for a writ is not summarily denied for failing to state a valid basis for relief, then the judge will order a hearing to decide the matter.
Typical examples where a court has granted a habeas corpus petition include claims of new evidence discovered in the case, ineffective assistance of counsel, prosecutorial misconduct, incompetence to stand trial, and challenging conditions of confinement.
The court must rule on a petition for writ of habeas corpus within 60 days after the petition is filed. (B) If the court fails to rule on the petition within 60 days of its filing, the petitioner may file a notice and request for ruling.
The right to file a petition for writ of habeas corpus is guaranteed by the California constitution. In order to be eligible to petition for such relief, the petitioner must be “in custody,” either actually or constructively.
Today, habeas corpus is mainly used as a post-conviction remedy for state or federal prisoners who challenge the legality of the application of federal laws that were used in the judicial proceedings that resulted in their detention.
You can file it only after exhausting all criminal appeals, and the petition must show your detention violates the law or your constitutional rights as per Penal Code 1473. If your habeas corpus petition is granted, the court may order your release, reduced charges, a new trial, or a modified sentence.