A petition for writ of habeas corpus is a legal action that allows individuals to challenge their unlawful imprisonment or restraint. Generally speaking, the writ of habeas corpus is available in any case where the trial court has acted in excess of its jurisdiction.This manual explains how someone without a lawyer can file a petition for writ of habeas corpus in the California state courts. The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully. Prisoners can sometimes use a petition for writ of habeas corpus to challenge the legality of a criminal conviction or inhumane prison conditions. The "Great Writ" of habeas corpus is a fundamental right in the Constitution that protects against unlawful and indefinite imprisonment. "Good Faith" means honest intent to act without taking an unfair advantage over another person. Any prisoner, or another person acting on their behalf, may petition the court, or a judge, for a writ of habeas corpus.