Right to Habeas Corpus
From Criminal Defense Wiki
A writ of habeas corpus is a judicial mandate to prison officials ordering that a prisoner is brought before the court in order to determine whether or not that person is imprisoned lawfully and whether he should be released from custody.
The right to petition for a writ of habeas corpus allows the prisoner or another person on behalf of the prisoner to object to his own or another's detention or imprisonment. The petition must show that the court ordering the detention or imprisonment made a legal or factual error.