To what habeas corpus extends. – Except as otherwise expressly provided by law, the writ of habeas corpus shall extend to all cases of illegal confinement or detention by which any person is deprived of his liberty, or by which the rightful custody of any person is withheld from the person entitled thereto. – Section 1, Rule 102, Revised Rules of Court
A writ requiring a person under arrest to be brought before a judge or into court, especially to secure the person’s release unless lawful grounds are shown for their detention. – Oxford Dictionary
A writ of habeas corpus (which literally means to “produce the body”) is a court order demanding that a public official (such as a warden) deliver an imprisoned individual to the court and show a valid reason for that person’s detention. – Criminal.FindLaw.com
The writ of Habeas Corpus originated in England.