Skip to content
AS
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 the protection of personal liberty. It is governed by Article 17.4 of the Spanish Constitution and by Organic Law 6/1984 of 24 May. Its purpose is to obtain the immediate placement before the competent judicial authority of any person unlawfully detained, so that the judge verifies the circumstances of the detention and either regularises it or brings it to an end. It is a summary, urgent, free procedure with no formalities: the judge must resolve within a maximum of 24 hours.

Cases of Unlawful Detention

Article 1 of Organic Law 6/1984 lists the cases:

  • Detention without legal cause: without a rational indication of an offence justifying the deprivation of liberty.
  • Detention by an incompetent authority: carried out by someone lacking the power to detain.
  • Prolonged detention: maintained beyond the legal time limit (24 hours by the police; 72 hours with judicial extension; 5 days in terrorism cases).
  • Deprivation of liberty with breach of rights: without the reading of rights, without legal assistance, without notification to family or consulate, or in unofficial premises.
  • Committal without the required guarantees: involuntary committals carried out without judicial authorisation.

Procedure and Timeframes

The procedure is extraordinarily swift: (1) Application by simple writ, oral appearance or telegram addressed to the on-duty Investigating Judge. (2) Opening order: the judge decides whether to admit the application. (3) Appearance: the detainee is immediately placed before the judicial authority; the judge hears the detainee, their lawyer, the Public Prosecutor and the officer who carried out the detention. (4) Resolution: within a maximum of 24 hours from the application, by an order ending the procedure.

Who Can Request Habeas Corpus

Standing is extraordinarily broad (Article 3 of Organic Law 6/1984): the detainee; their spouse or a person in an analogous relationship; descendants, ascendants and siblings and, for foreigners, their diplomatic or consular representatives; the Public Prosecutor; the Ombudsman; and the competent judge. No lawyer or court representative is required, although immediate legal assistance speeds up and strengthens the procedure.

Effects and Consequences

If the judge finds the detention unlawful, they may order: (a) the immediate release of the detainee; (b) the continuation of the detention under a different authority; (c) transfer to a different facility; or (d) the establishment of the legal guarantees that had been omitted. Upholding the habeas corpus may also give rise to the criminal liability of the authority or official responsible for the unlawful detention (Arts. 167 and 530 CP).

balance

Penalties & Consequences: Habeas Corpus: Defense of the Unlawfully Detained

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

Defense Strategy: Habeas Corpus: Defense of the Unlawfully Detained

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/15EAW 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