habeas corpus

/ˌheɪbiəs ˈkɔːpəs/noun
University
1

A writ ordering that a person be brought before a court or a judge, most frequently used to ensure that a person's imprisonment, detention, or commitment is legal.

Thesaurus