Habeas corpus is a legal procedure invoking the jurisdiction of a court to review the unlawful detention or imprisonment of an individual, and request the individual's custodian to bring the prisoner to court, to determine whether their detention is lawful. From Wikipedia