Skip to content
A
Alonso Sala
CRIMINAL LAWYERS
ES

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).

balance

Penalty Chart

Type / ScenarioCriminal 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 liabilityCompensation 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.

shield_lock

Our Defense Strategy

gavel01

Telematic submission

Immediate submission via email to on-duty court to gain time.

gavel02

Visual documentation

When possible, capture of physical traces and testimonials about detention conditions.

gavel03

Family and consular coordination

We immediately notify family and, if foreigner, corresponding consulate.

gavel04

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

FrameworkLegal BasisScopeKey Feature
Fast-track trialsArts. 795-803 LECrimOffences punishable by up to 5 years prisonTrial within 15 days of arrest
European Arrest WarrantLO 23/2014Cross-EU extradition60-day maximum execution
Prison classificationLO 1/1979 (LOGP)Classification into grades 1, 2 or 3Open regime (grade 3) = semi-liberty
Conditional releaseArts. 90-93 CPRelease from prison on licence¾ of sentence served + good conduct
Juvenile justiceLO 5/2000Offenders aged 14-17Educative measures, not punishment
Criminal record expungementArt. 136 CPDeletion of criminal recordTimeframe 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

Doctrina TSRight to fast-trial conformity reduction

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.

STJUE C-404/15 (Aranyosi)EAW and fundamental rights protection

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.

Doctrina TCRight to prison grade review

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.

gavel

Why Choose Us?

Need a criminal defense lawyer for this type of offense? Here's how we work:

check
Immediate petitionUrgent activation of procedure without need for formalities or waiting for preliminary procedures.
check
Guarantee verificationOn-site verification of detainee rights compliance at police premises.
check
Constitutional articulationFoundation in Art. 17 SC and constitutional jurisprudence.
workspace_premium
+15 Years of ExperienceTeam dedicated exclusively to criminal law before Spanish courts and tribunals.
support_agent
Direct AttentionYour case is handled directly by a senior lawyer of the firm.
Consult My Casearrow_forward

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.

call