Habeas corpus is a legal writ (court order) that requires a person under arrest to be brought before a judge or into court. This fundamental legal protection safeguards individual liberty against unlawful and indefinite detention. The term literally means "you shall have the body" in Latin.