Habeas corpus is an equitable remedy by which a report can be made to a court alleging the unlawful detention or imprisonment of an individual, and requesting that the court order the individual's custodian to bring the prisoner to court, to determine whether their detention is lawful. From Wikipedia