A habeas petition proceeds as a civil action against the State agent (usually a warden) who holds the defendant in custody. Habeas corpus is a legal rule that requires a prisoner be presented in court and that the arrester prove that there is proper cause for detaining the prisoner.Habeas corpus is a Latin phrase meaning "produce the body. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. The Habeas Corpus petition claims the arrest, sentence, or trial violated constitutional law, making imprisonment unlawful. Habeas corpus prevents the King from simply locking up subjects in secret dungeons and throwing away the key. In many countries, authorities may incarcerate someone for months or years without charging them. An essential safeguard of personal liberty is the writ of habeas corpus. The "Great Writ" of habeas corpus is a fundamental right in the Constitution that protects against unlawful and indefinite imprisonment. The courthouse of the Appellate Division, Second Department, is located in Kings County in the Brooklyn Heights Historic District.