habeas corpus
noun
°A writ to bring a person before a court or a judge, most frequently used to ensure that a person's imprisonment, detention, or commitment is legal.