Because the purpose of the petition is to gain the release of an unlawfully detained person, the reasons that justify the writ are narrowly defined. The "Great Writ" of habeas corpus is a fundamental right in the Constitution that protects against unlawful and indefinite imprisonment.The Habeas Corpus petition claims the arrest, sentence, or trial violated constitutional law, making imprisonment unlawful. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. It tests the legality of a detention or a restraint and the goal is to use it really almost i guess it's an emergency basis. Habeas corpus is a remedy for violations of constitutional rights, such as ineffective assistance of counsel. Literally, it means "bring out the body" of a person who has been imprisoned, and present him in front of a judge, for one reason or another. Latin, meaning "you have the body. To bring a habeas claim, incarcerated people in the custody of a tribal court should use 25 U.S.C. § 1303. By contrast, habeas corpus provides a separate avenue for challenging imprisonment.