
Habeas Corpus: Defense of the Unlawfully Detained
Urgent habeas corpus procedure (Organic Law 6/1984) to challenge unlawful or irregular detentions. Judicial resolution within 24 hours.
Last updated:
What is Habeas Corpus
Habeas corpus is the oldest constitutional guarantee for personal liberty protection. It is regulated by Art. 17.4 SC and Organic Law 6/1984 of May 24. Its purpose is to obtain immediate placement before the competent judicial authority of any person unlawfully detained, so the judge verifies detention circumstances and either regularizes it or ends it. It is a summary, urgent, free procedure with no formalities: the judge must resolve within 24 hours.
Cases of Unlawful Detention
Art. 1 LO 6/1984 enumerates the cases:
- Detention without legal cause.
- Detention by incompetent authority.
- Prolonged detention (beyond 24h police; 72h with judicial extension; 5 days in terrorism).
- Liberty deprivation with rights violation.
- Internment without required guarantees.
Procedure
The procedure is extraordinarily agile: request through simple writ, oral appearance or telegram addressed to the on-duty Investigating Judge; opening order; appearance with detainee placement before judicial authority; resolution within maximum 24 hours.
Standing
Standing is extraordinarily broad (Art. 3 LO 6/1984): the detainee; spouse or person united by analogous relationship; descendants, ascendants, siblings and, for foreigners, diplomatic or consular representatives; Prosecutor; Ombudsman; competent judge.
Effects
If unlawfulness is appreciated, the judge may order: immediate release; continuation of detention under different authority; transfer to different facility; or establishment of omitted legal guarantees. Estimation may additionally generate criminal liability of authority responsible for unlawful detention (Arts. 167 and 530 CP).
Penalty Chart
| Type / Scenario | Criminal Penalty |
|---|---|
| Unlawful detention (Art. 167 CP) | 4 to 8 years' imprisonment for authority or official practicing unlawful detention. 8 to 12 years' disqualification. |
| Rights violation (Art. 530 CP) | Employment and salary suspension for official violating detainee rights. |
| Patrimonial liability | Compensation for judicial error or abnormal functioning of Justice Administration (Art. 121 SC). |
* Penalties shown are indicative. The actual penalty depends on case circumstances, applicable mitigating and aggravating factors.
Our Defense Strategy
Telematic submission
Immediate submission via email to on-duty court to gain time.
Visual documentation
When possible, capture of physical traces and testimonials about detention conditions.
Family and consular coordination
We immediately notify family and, if foreigner, corresponding consulate.
Action reserve
If detention was unlawful, assessment of criminal actions against authority and patrimonial liability claim.
Criminal Procedure in Spain: Fast Trials, Extraditions & Prison Law — Defence Guide
Beyond substantive criminal offences, Spanish law contains a complex procedural framework that directly affects defence strategy. Fast-track trials (juicios rápidos), extradition procedures (European Arrest Warrants and bilateral treaties), penitentiary law (classification grades, parole, sentence review) and juvenile justice (LO 5/2000) each demand specialised knowledge. Understanding procedural rights and deadlines is often decisive for the outcome of a case.
Key Procedural Frameworks
| Framework | Legal Basis | Scope | Key Feature |
|---|---|---|---|
| Fast-track trials | Arts. 795-803 LECrim | Offences punishable by up to 5 years prison | Trial within 15 days of arrest |
| European Arrest Warrant | LO 23/2014 | Cross-EU extradition | 60-day maximum execution |
| Prison classification | LO 1/1979 (LOGP) | Classification into grades 1, 2 or 3 | Open regime (grade 3) = semi-liberty |
| Conditional release | Arts. 90-93 CP | Release from prison on licence | ¾ of sentence served + good conduct |
| Juvenile justice | LO 5/2000 | Offenders aged 14-17 | Educative measures, not punishment |
| Criminal record expungement | Art. 136 CP | Deletion of criminal record | Timeframe varies by offence severity |
Key Defence Strategies
Fast-Trial Conformity Advantage
In fast-track proceedings, agreeing to a plea (conformidad) with the prosecution can yield a sentence reduction of up to one-third. This can make the difference between prison and a suspended sentence.
EAW Refusal Grounds
European Arrest Warrants may be refused on grounds of: ne bis in idem (double jeopardy), time-barred offence, minor's age, or if the person will serve the sentence in Spain. Each ground requires specific procedural challenges.
Prison Grade Review
Inmates may contest their classification grade before the Supervisory Judge (Juez de Vigilancia Penitenciaria). Progression to grade 3 (semi-liberty) requires demonstrating good conduct, personal development and reduced recidivism risk.
Juvenile Diversion
For juvenile offenders, the defence can request diversion (sobreseimiento) if the minor completes a mediation or reparation programme. This avoids formal proceedings and prevents a juvenile record entirely.
Key Case Law
The Court confirmed that defendants who reach a plea agreement in fast-track proceedings have an absolute right to the one-third sentence reduction. The judge cannot refuse the agreed sentence if it falls within the statutory range.
The CJEU established that execution of a European Arrest Warrant may be suspended if there is a real risk of inhumane treatment in the issuing state. The executing authority must request specific assurances before surrender.
The Constitutional Court holds that prison classification decisions must be reasoned and subject to periodic review, in line with the fundamental rights of sentenced persons under Art. 25.2 CE.
Why Choose Us?
Need a criminal defense lawyer for this type of offense? Here's how we work:
Do you need specialised legal assistance?
The judicial system is complex. We have the criminal-law specialisation and technical resources required to take on the defence.