Habeas corpus
Overview
is a writ
Writ
In common law, a writ is a formal written order issued by a body with administrative or judicial jurisdiction; in modern usage, this body is generally a court...

, or legal action, through which a prisoner can be released from unlawful detention
Imprisonment
Imprisonment is a legal term.The book Termes de la Ley contains the following definition:This passage was approved by Atkin and Duke LJJ in Meering v Grahame White Aviation Co....

. The remedy can be sought by the prisoner or by another person coming to his aid. Habeas corpus originated in the English
England
England is a country that is part of the United Kingdom. It shares land borders with Scotland to the north and Wales to the west; the Irish Sea is to the north west, the Celtic Sea to the south west, with the North Sea to the east and the English Channel to the south separating it from continental...

 legal system, but it is now available in many nations. It has historically been an important legal instrument safeguarding individual freedom against arbitrary state action. It is a writ requiring a person to be brought before a judge.

A writ
Writ
In common law, a writ is a formal written order issued by a body with administrative or judicial jurisdiction; in modern usage, this body is generally a court...

 of habeas corpus, also known as the Great Writ, is a summons with the force of a court order
Court order
A court order is an official proclamation by a judge that defines the legal relationships between the parties to a hearing, a trial, an appeal or other court proceedings. Such ruling requires or authorizes the carrying out of certain steps by one or more parties to a case...

; it is addressed to the custodian (a prison official for example) and demands that a prisoner be taken before the court, and that the custodian present proof of authority, allowing the court to determine whether the custodian has lawful authority to detain the person.
 
x
OK