In the common law legal system habeas corpus, Latin for "you should have the body", is a prerogative writ requiring the government to produce a prisoner before a court and justify his or her imprisonment. Its purpose is to release someone who has been arrested unlawfully.