(a) A person unlawfully imprisoned or restrained of their liberty, under any pretense, may prosecute a writ of habeas corpus to inquire into the cause of the imprisonment or restraint.
Habeas Corpus petitions are filed in a California court by inmates or, more specifically, their attorneys, claiming they have been unlawfully detained or imprisoned. It is considered a last legal resort after other legal remedies and appeals have been exhausted.
In its simplest form a writ of habeas corpus requires that a person who is in custody be brought before a judge or court and that they be able to challenge that custody. The writ of habeas corpus is used to attack an unlawful detention or illegal imprisonment.
Thus, to effectively file a writ of habeas corpus in California state court, an inmate must have been convicted and either serving a sentence of incarceration, probation or parole. They must have also filed a direct appeal to the appellate court and then to the California Supreme Court.
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.
Article I, Section 9, Clause 2: The Privilege of the Writ of Habeas Corpus shall not be suspended, unless when in Cases of Rebellion or Invasion the public Safety may require it.
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.
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.