info@societejuridique.com
Madrid: Paseo de la Castellana 216 8 ª Planta
Alicante: Av. Ansaldo Nº31, local 16
24h emergencies: 669 30 21 13

Social media:

Criminal procedure guide · Spain

Detention in Spain: time limits, rights of the detainee and habeas corpus

Updated to LO 1/2026 and LO 1/2025 · Reviewed July 2026 · Author: Francisco Javier Martín Porras, criminal lawyer and court expert · SCJE team

Detention is the most invasive measure the police can adopt without a judge, and for that reason it is surrounded by limits: only in the cases provided by law, for the strictly necessary time and with a reinforced catalogue of rights. Exceeding the time limits or emptying the rights of content turns the detention into an unlawful one and triggers habeas corpus. We assist detainees 24 hours a day throughout the province of Alicante and in Madrid.

In brief. In brief. Maximum of 72 hours before being brought before a judge (Constitution and art. 520 LECrim). The detention must be carried out in the manner least harmful to the detainee (art. 520.1). Rights apply from minute one: silence, lawyer, communication, doctor, interpreter. Any breach opens habeas corpus before the duty court.

Practical keys

72 h
absolute constitutional maximum before judicial disposition
3 h
maximum delay for the lawyer to arrive at the police station
24 h
maximum for the duty judge to decide habeas corpus after hearing the detainee

Limits on detention and how a breach becomes your defence

Detention is surrounded by legal limits precisely because it is the most invasive measure the police can adopt without a judge: it may only take place in the cases prescribed by law, for the time strictly necessary and with a reinforced catalogue of rights that applies from minute one, including silence, a lawyer, communication with a family member, a doctor and an interpreter. The maximum before being brought before a judge is 72 hours, and the detention must always be carried out in the manner that least harms the detainee (art. 520.1 LECrim).

Exceeding the time limits or emptying the rights of content turns the detention into an unlawful one and activates habeas corpus before the duty court. Our defence work starts at the police station: immediate presence, control of the rights record, private interview before any police statement (art. 520.6 d) LECrim), habeas corpus against detentions that exceed the strictly necessary time and, as a general strategy, silence at the police station and, where appropriate, a statement before the judge.

Provision by provision

The legal framework of detention, article by article

Arts. 489 and 490 LECrim

Who may detain

No citizen may be detained except in the cases and manner prescribed by law. A private individual may only detain in flagrante delicto or in case of escape, and the obligation to hand the person over to the authority immediately is absolute.
In practice

Detention by private individuals

Detention by private individuals arises with security guards and shop managers: it is only possible in flagrante delicto and with immediate handover. Prolonged retentions “until the police arrive” without clear flagrancy generate liability for unlawful detention under art. 163 of the Criminal Code and turn the person retaining into a defendant.
Art. 492 LECrim

Police detention

The police must detain the person formally indicted, the fugitive and anyone against whom there are rationally sufficient grounds of participation in an act punishable with more than 3 years of imprisonment (or less if there is a risk of flight). Outside those cases the proper measure is a summons, not detention: “automatic” detentions for minor acts without flight risk are challengeable.
In practice

Automatic detentions are unlawful

The police habit of detaining in every case is unlawful: for offences carrying less than 3 years, detention requires indications of flight or non-appearance. Detentions of fully identified persons with established roots for minor offences are challenged as unlawful and taint the immediate proceedings: we raise it at once in the habeas corpus or at the first appearance.
Art. 496 LECrim

Time limit for handover

The detainee must be released or handed over to the nearest judge within the following 24 hours; the absolute constitutional limit for judicial disposition is 72 hours. The time “strictly necessary for the clarification of the facts” is the true limit: exhausting the 72 hours with no proceedings pending is unlawful. The Constitutional Court has repeated it since STC 224/1998: when the proceedings (statement, identifications) have concluded and the handover is delayed “for scheduling reasons”, we file habeas corpus, because the deprivation of liberty has become unlawful even if the maximum period has not expired.
Art. 520 LECrim

Rights of the detainee

Immediate, written and comprehensible information of the facts and rights; silence and non-self-incrimination; a lawyer of one’s choice or a duty lawyer without delay (maximum 3 hours); notification of the fact and place of custody to a family member; a supervised telephone call; a doctor; an interpreter; information on habeas corpus; and a private interview with the lawyer even before the police statement. Any breach is documented and used in the proceedings.
In practice

Access to the essential police file

The 2015 reform secured the lawyer’s access to the essential elements of the police file needed to challenge the detention: we always request the objective elements that justify it. Its total denial is a ground for habeas corpus and nullity. And the detainee’s call to a third party is a right, not a courtesy: any refusal is placed on the record.
Art. 520 bis LECrim

Terrorism cases

In terrorism offences, judicial disposition may be extended by a further 48 hours (up to 5 days) with judicial authorisation, and incommunicado detention is possible with exceptional restrictions of rights, always under strict judicial control. The extension requires a reasoned police request within the first 48 hours and express judicial authorisation; incommunicado detention is today exceptional and of limited content after the 2015 reform (never for minors). Every hour in excess turns the custody unlawful, with cascading effects on anything declared.
LO 6/1984

Habeas corpus

Any detainee, their family or their lawyer may apply for habeas corpus before the duty judge against detentions that are unlawful or exceed the legal time limits or forms. The judge must decide within 24 hours after hearing the detainee: it is the emergency mechanism, and its outright dismissal without a hearing is reiterated constitutional doctrine granting amparo. The Constitutional Court grants amparo again and again against outright inadmissions: if there is a detention and unlawfulness is alleged, the judge must hear the detainee (SSTC 21/2014 and 73/2021, among many). The application can be filed by the lawyer on duty; we always include the exact times of each milestone and the specific proceeding that is missing, because the debate is factual and is won with chronology.
Limits at a glance

Summary table: time limits and safeguards of detention

SafeguardLegal basisContentEffect of breach
Strictly necessary timeArt. 17 CE and art. 520 LECrimDetention only for the time needed for clarification, 72 h absolute maximumUnlawful detention; habeas corpus before the duty judge
Handover within 24 hoursArt. 496 LECrimRelease or handover to the nearest judge within 24 hoursProlongation beyond concluded proceedings is unlawful
Lawyer without delayArt. 520 LECrimAssistance by chosen or duty lawyer, maximum 3 hoursGround for habeas corpus and nullity of proceedings
Written information of rightsArt. 520 LECrimImmediate, written and comprehensible information of facts and rightsRights record challengeable; statements excludable
Private interviewArt. 520.6 d) LECrimReserved meeting with the lawyer before the police statementInterrogations started without it are challengeable
Communication and callArt. 520 LECrimNotification to family member and supervised telephone callRefusal is placed on the record and exploited in the case
Terrorism extensionArt. 520 bis LECrimUp to 48 additional hours (5 days total) with judicial authorisationEvery hour in excess makes the custody unlawful
Habeas corpusLO 6/1984Decision by the duty judge within 24 hours after hearing the detaineeOutright dismissal without hearing grounds constitutional amparo

Summary drawn from the Spanish source page for orientation purposes. The applicable provisions are those in force at the relevant time; each case requires individual analysis by a criminal lawyer.

How we use it in your defence

Four moves at the police station that decide the case

Original commentary by the firm, checked against the reference work in our library: Ley de Enjuiciamiento Criminal Comentada, Lefebvre-El Derecho, 13th edition, May 2026. The debate in habeas corpus is factual and is won with chronology: we document the exact time of every milestone at the police station, because the minutes matter, and we identify the specific proceeding that is missing when custody is being prolonged.

01

Immediate presence at the police station and control of the rights record

02

Private interview prior to the police statement (art. 520.6 d) LECrim)

03

Habeas corpus against detentions exceeding the strictly necessary time

04

Silence strategy at the police station: declare, where appropriate, before the judge

Timeline

The clock of a detention, hour by hour

Phase 01

Minute one: written and comprehensible information of facts and rights; the detention must be carried out in the manner least harmful to the detainee (art. 520.1 LECrim)

Phase 02

First 3 hours: arrival of the chosen or duty lawyer; private interview before any police statement

Phase 03

First 24 hours: release or handover to the nearest judge under art. 496 LECrim; only the time strictly necessary for the proceedings is justified

Phase 04

72 hours at most: absolute constitutional limit for judicial disposition (5 days only in terrorism with judicial extension); afterwards, or once the proceedings have concluded, custody is unlawful and habeas corpus lies

Who this guide is for

Situations where the detention framework decides the outcome

Detainees whose custody is being prolonged

If the proceedings have concluded and the person remains in the cells “waiting”, the prolongation is unlawful even within the 72-hour maximum: habeas corpus lies before the duty judge.

🛡

Persons detained for minor offences

For offences carrying less than 3 years, detention requires indications of flight or non-appearance. Automatic detentions of fully identified persons with established roots are challengeable as unlawful.

👪

Families of detainees

The family must be notified of the fact and place of custody. The detainee, their spouse or partner, ascendants, descendants and siblings, their lawyer and the Public Prosecutor may all apply for habeas corpus.

Anyone facing a police statement

The police statement is not evidence and cannot be reproduced at trial as such, but it can compromise the strategy. Our general rule is silence at the police station and, where appropriate, a statement before the judge with the case file known.

FAQ

Frequently asked questions on detention and habeas corpus

How long can I be held in detention?
For the time strictly necessary for the investigations, with two ceilings: 24 hours for handover to the judge under art. 496 LECrim and 72 hours as the absolute constitutional maximum (5 days only in terrorism cases with judicial extension). If the proceedings have finished and you remain in the cells “waiting”, the prolongation is unlawful and habeas corpus lies.
Is it advisable to make a statement at the police station?
Almost never. The police statement is not evidence and cannot be reproduced at trial as such, but it can compromise the strategy. Our general rule is silence at the police station, a private interview, and a statement (if advisable) before the judge with the case file known. Every case has nuances: that is what the 24-hour assistance is for.
Who can apply for habeas corpus and how fast does it work?
The detainee, their spouse or partner, ascendants, descendants and siblings, their lawyer and the Public Prosecutor. It is filed before the duty judge of the place of detention, who must decide within a maximum of 24 hours after hearing the detainee. Well presented, it turns an irregular detention into immediate release.

Speak to a criminal lawyer

In a fast-track case, the days you have are the case.

Criminal defence in English before the courts of Alicante and the rest of Spain, for residents and for visitors who have flown home.

Logotipos-abogacia-scje
Paseo De La Castellana 216 8º 28046 Madrid
Alicante – Playa de San Juan Av. Ansaldo 31, local 16, 03540 Alicante
Londres: 20 Wenlock Road, N1 7GU, Reino Unido
París: 72 Faubourg St Honoré, 75008, Francia
info@societejuridique.com

Société de Conseil Juridique et Expert es un despacho de abogados con sedes en Madrid, Alicante, Londres y París, especializado en defensa y acusación penal, delitos económicos y corporativos y derecho tecnológico. Trabajamos con orientación estratégica en procedimientos penales complejos, propiedad intelectual y análisis forense avanzado, y prestamos consultoría jurídica, compliance y escudos de protección a particulares y empresas. Atendemos desde Alicante y Madrid, con consulta online en toda España y asistencia al detenido 24 horas. Resuelva sus dudas en las preguntas frecuentes o solicite una primera consulta.

Copyright © 2026 Société de Conseil Juridique et Expert S.L.

EspanolEnglishFrancaisРусскийItalianoDeutsch
WhatsApp · Urgencias 24h