Insight

How to apply for habeas corpus: a practical step-by-step guide

How to apply for habeas corpus: a practical step-by-step guide

SL

Written by Select lawyer...

Published: June 11, 2026

Knowing that habeas corpus exists is important; knowing how to invoke it when needed is essential. It is not a mechanism that sets itself in motion or that the police will facilitate: it is a right that must be exercised actively, correctly and with the greatest speed, because in an unlawful detention every hour counts.

The first step, before filing anything, is to verify that one of the legal grounds that justify it is present. Organic Law 6/1984 lists them exhaustively: detention without the legal prerequisites, failure to comply with essential formal requirements, exceeding the maximum time limits, detention at an unknown location or in unlawful conditions, and deprivation of liberty by an unauthorised person. An application not based on any of these grounds will not succeed. It is advisable to make a quick assessment: have the 72 hours been exceeded?, were the rights not communicated?, was a lawyer not allowed?, is the detainee at an unknown location? If any applies, habeas corpus is justified. This initial assessment is best made with a criminal lawyer.

The application may be filed by the detainee themselves, their spouse or partner, their ascendants, descendants and siblings, their legal representative, the Public Prosecutor and the Ombudsman. This breadth prevents the procedure from being blocked if the detainee cannot act on their own behalf.

The application must be addressed, as a general rule, to the investigating court of the place where the detainee is held or, outside ordinary hours, to the duty court. If the location is unknown, the court of the place of detention or of the applicant's domicile may be used. An important exception: if the deprivation of liberty was ordered by a judge, for example by an order of pre-trial detention, the route is not habeas corpus but an appeal before the Provincial Court.

The written application does not require rigid formal requirements, but it must contain the identification of the applicant and their relationship with the detainee; the identification of the detainee; the place of detention or known whereabouts; the circumstances of the detention and the grounds of unlawfulness, set out clearly and specifically; and an express request that the procedure be initiated and release be ordered. It may be filed in writing or, in cases of maximum urgency, orally before the court clerk of the duty court, which operates 24 hours a day, every day of the year.

Once the application is received, the judge examines whether the facts could constitute an unlawful detention; if such a possibility is found, the procedure is initiated and the presentation of the detainee is required. After a summary hearing in which the judge hears the detainee, their lawyer and the authority that carried out the detention, a decision is issued. If it is upheld, immediate release is ordered and the nullity of the actions carried out during the unlawful detention may be declared. If it is dismissed, the order may be appealed and, ultimately, an appeal for protection (amparo) may be brought before the Constitutional Court.

Although the law does not require a lawyer, having a criminal lawyer makes a real difference: they know how to identify the ground, know the competent court, draft the application effectively and can act swiftly even in the early hours or on a holiday. The procedure is also exempt from court fees, so the applicant's financial situation is never an obstacle.

Trending Articles

Recognizing Legal Leaders: The 2027 Best Lawyers Awards in Australia, Japan and Singapore


by Jamilla Tabbara

Market drivers, diversity trends and the elite practitioners shaping the legal landscape.

Illustrated maps of Australia, Japan and Singapore displayed with their national flags, representing

Holiday Pay Explained: Federal Rules and Employer Policies


by Bryan Driscoll

Understand how paid holidays work, when employers must follow their policies and when legal guidance may be necessary.

Stack of money wrapped in a festive bow, symbolizing holiday pay

How Far Back Can the IRS Audit You?


by Bryan Driscoll

Clear answers on IRS statutes of limitations, recordkeeping and what to do if you are under review.

Gloved hand holding a spread of one-hundred-dollar bills near an IRS tax document

Musk v. Altman: The Lawyers Behind the Case


by Jamilla Tabbara

Meet the Trial Lawyers Shaping One of AI's Biggest Legal Disputes.

Portrait photos of Elon Musk and Sam Altman positioned in front of the OpenAI logo.

Can You File Bankruptcy on Credit Cards


by Bryan Driscoll

Understanding your options for relief from overwhelming debt.

Red credit card on point-of-sale terminal representing credit card debt

The Legal Teams Behind the Blake Lively–Justin Baldoni Settlement


by Grace Greer

A closer look at the legal teams and attorneys involved in the Blake Lively–Justin Baldoni litigation and its resolution.

Split-screen image of Blake Lively and Justin Baldoni

How AI Is Changing the Way Clients Find Lawyers


by Jamilla Tabbara

Best Lawyers CEO Phil Greer explains how AI-driven search tools are reshaping legal marketing and why credibility markers matter.

AI chat bubble icon with stars representing artificial intelligence transforming client-lawyer conne

When Is It Too Late to Stop Foreclosure?


by Bryan Driscoll

Understanding the foreclosure timeline, critical deadlines and the legal options that may still protect your home.

Miniature house model on orange background surrounded by thumbtacks representing foreclosure

Colorado’s 2026 Water Rights Battles


by Bryan Driscoll

A new era of conflict begins.

Colorado Water Rights 2026: A New Era of Conflict headline

Can You Go to Jail at an Arraignment?


by Bryan Driscoll

Understanding What Happens at Your First Court Appearance.

A heavy chain lying on the ground in the foreground with a blurred figure standing in the background

What’s the Difference Between DUI and DWI?


by Bryan Driscoll

Understanding the terminology and consequences of impaired driving charges.

Driver during nighttime police traffic stop with officer's flashlight shining through car window

The Best Lawyers in France 2027: Peer-Reviewed Excellence


by Jamilla Tabbara

Seventeen editions of peer trust, a growing profession and a dynamic legal market.

3D Map of France with National Flag Graphic

How to Choose a Personal Injury Lawyer


by Bryan Driscoll

Finding the right legal representation after an injury is a critical decision that requires careful evaluation. 

3D scene representing the deliberative process of choosing a personal injury attorney

What Happens if You Don't File Taxes


by Bryan Driscoll

The penalties are real, but so are your options. Here's what the IRS can do and what you can do about it.

A torn dollar bill revealing a watchful eye, surrounded by flying documents

When to Get a Lawyer for Work Injury


by Bryan Driscoll

Understanding your rights and navigating the complexity of workers’ compensation claims.

Injured worker receiving medical attention at workplace

What Disqualifies You From Filing Bankruptcies


by Bryan Driscoll

A guide to navigating eligibility, the means test and the legal hurdles of declaring bankruptcy.

A silhouette of a large hand pushing over a row of falling dominos toward a small figure standing be