California Petition for Writ of Habeas Corpus — PenaCommitmenten— - Mental Health is a legal document used in California to challenge the legality of a person’s confinement in a Penal Institution or Mental Health Facility. This document is typically filed by a person who believes that their confinement is unlawful and that they should be released from the institution or facility. There are two types of California Petition for Writ of Habeas Corpus — PenaCommitmenten— - Mental Health: criminal and civil. The criminal type is used when a person is facing criminal charges and believes the confinement is unlawful. The civil type is used when a person is being held in a mental health facility and believes the confinement is unlawful. In either case, the individual must prove that the confinement is not only unlawful but also unconstitutional. If the court agrees, the individual will be released from confinement.