Skip to content
Alonso Sala
CRIMINAL LAWYERS

Criminal Lawyers in Child Pornography

Advanced technical defense under Art. 189 of the Criminal Code. Protecting your fundamental rights against digital evidence

Child pornography offences are defined in art. 189 CP. Producing, distributing, selling or facilitating this material carries 1 to 5 years' imprisonment (art. 189.1), rising to 5 to 9 years where aggravating circumstances concur, such as the use of minors under sixteen (art. 189.2); mere possession or knowingly accessing it for personal use carries 3 months to 1 year in prison or a 6-month to 2-year fine (art. 189.5). Most of these cases originate in automated provider alerts and IP tracing, so forensic computer evidence and the chain of custody are decisive. At Alonso Sala we defend clients under investigation for art. 189 CP throughout Spain, from the house search to trial.

You are under investigation for an offence under art. 189 CP: what it means and what happens next

These proceedings rarely begin with a summons. They begin with a house search authorised by a reasoned order of the investigating court under art. 18.2 of the Constitution, and with the seizure of computers, phones and storage media. Searching those devices in turn requires a specific judicial order. The material is cloned using hash functions to preserve the chain of custody and analysed in a forensic laboratory, work measured in months that sets the timetable for everything else. The rights of art. 118 LECrim apply from the outset and, where there was an arrest, those of art. 520 LECrim; the first appearance before the investigating judge is governed by art. 775 LECrim. In these cases the file is frequently declared secret for part of the investigation.

Fast-track trial is not available: the investigation is technical and lengthy. The case proceeds as preliminary proceedings and the trial court depends on the modality. Art. 189.1 CP carries one to five years' imprisonment for recruiting or using minors to produce pornographic material and for producing, selling, distributing, exhibiting or facilitating child pornography, as well as possessing it for those purposes; art. 189.5 CP carries three months to one year's imprisonment, or a fine of six months to two years, for acquiring or possessing it for personal use and for knowingly accessing it through information technologies. Within those ranges the Criminal Court tries the case. Art. 189.2 CP raises the penalty to five to nine years' imprisonment where one of the listed circumstances applies, among them the use of minors under sixteen or material of notable quantity; in that event the Provincial Court tries the case. A conviction also entails registration in the Central Register of Sex Offenders and disqualification from activities involving minors.

What to do (and what not to do) before making a statement

  • Do not make a statement without a defence lawyer of your own choosing. Art. 520 LECrim gives you the right to remain silent, not to testify against yourself and not to plead guilty, and to consult your lawyer privately beforehand. Do not hand over passwords or consent to examination of your devices without prior advice: access to the content requires judicial authorisation and you are not obliged to provide evidence against yourself.
  • Do not contact the complainant or the witnesses, directly or through third parties. Nor should you discuss the case with those you live with if they may be called to testify about who used the equipment.
  • Gather the documents specific to this offence: a copy of the order authorising the search and of the record drawn up, listing the devices seized and their serial numbers; your internet service contract and router configuration, including the password and who knew it; the list of people with access to the home, the equipment and the wireless network; the user accounts and profiles on each device; and invoices or records documenting earlier repairs, sales or transfers of the equipment.
  • Do not delete files, format drives or install secure-erasure software. Deletion leaves traces, is recoverable in forensic analysis, is read as evidence of knowledge of the content, and may add a charge of concealing evidence to the case.
  • Ask your lawyer to appoint an independent computer forensics expert to attend the cloning, verify the hash values and then examine where the files actually sat. Intent is an element of this offence: a file in the automatic download folder of a peer-to-peer network, in the browser cache or in a system thumbnail is not the same as material sorted and renamed by the user.

What the prosecution must prove (Art. 189 CP)

The offence of child pornography (Art. 189 CP) protects the legal interest of minors' sexual indemnity and, mediately, their dignity and integral development guaranteed in the UN Convention on the Rights of the Child (1989) and the Lanzarote Convention (Council of Europe 2007). The reform under LO 1/2015 radically expanded the typical scope, incorporating not only material using real minors but also realistic representations generated by computer, deepfakes and images produced by artificial intelligence staging minors or persons appearing to be in sexually explicit attitudes. Consolidated Supreme Court case-law and CJEU (case C-348/19) clarifies the contours of the type, distinguishing commissive modalities and requiring specific intent for all of them.

The Criminal Code structures three autonomous modalities with radically differentiated penalties. The production of pornographic material with real minors (Art. 189.1.a CP) is the most severely punished conduct, with 5 to 9 years' prison; when the aggravating factors of Art. 189.2 CP concur (minor under 16, prostitution situation, criminal organization, special degradation), the penalty can reach 9 years in upper half and require actual incarceration. Distribution, facilitation, dissemination or making available of child pornographic material (Art. 189.1.b CP) carries 1 to 5 years' prison; includes activities in P2P networks, forums, Telegram channels, shared cloud storage. Mere possession for personal use (Art. 189.5 CP) is punished with 3 months to 1 year of prison, or 6 months to 2 years' fine; although the penalty is the lowest, collateral consequences are devastating: registration in the Central Sex Offenders Registry for decades, disqualification to work with minors, device seizure.

The detection and prosecution mechanisms are highly technological. PhotoDNA, developed by Microsoft and adopted by Google, Facebook, Twitter and other providers, automatically scans file uploads and, through robust hashing, identifies known material catalogued by the NCMEC (National Center for Missing & Exploited Children). Alerts are transmitted to NCMEC, which redirects them to national authorities (in Spain, the BIT-Technological Investigation Brigade of the National Police and the GDT-Telematic Crime Group of the Civil Guard). Investigations develop through IP address tracking, requesting information from service providers (ISPs), international letters rogatory coordinated by Europol and Interpol, and undercover operations on forums and P2P networks. The digital chain of custody is a critical element: any defect in forensic cloning, use of write blockers, hash MD5/SHA256 verification or device sealing may determine evidentiary nullity.

Technical defense is built on four axes. First, the absence of intent in possession: the possession offence requires knowledge and will to possess; when files come from automatic browser downloads, cache-stored files, unsolicited receipts in Telegram/WhatsApp groups or pop-ups, computer expert evidence can prove the absence of acquisition will. Second, the incorrect identification of perpetrator: an IP address identifies a connection point —typically a router— and not a specific physical person; when the wifi network was vulnerable, there were several users in the dwelling, password was shared with neighbors or the router presented security failures, the in dubio pro reo principle operates. Third, the vulnerabilities of digital chain of custody: device manipulation without write blockers, absence of verification hash, sealing failures, breakage of documentary traceability, determine evidentiary nullity. Fourth, the challenge of police operation: entry and search must have motivated judicial authorization, legal assistance to the detained must be respected from the first moment, and line-ups and witness statements must adjust to procedural guarantees.

In current forensic practice, police operations on child pornography have reached massive dimensions: coordinated international operations with hundreds of simultaneous investigated, server interventions abroad through international judicial cooperation (EU Regulation 2018/1727 on Eurojust, MLA), application of the Budapest Convention on Cybercrime. Organic Law 8/2021 on integral protection of childhood and adolescence against violence has reinforced the protective framework and hardened penalties. Organic Law 1/2025 on Justice Service Efficiency and constitutional case-law on electronic evidence and Supreme Court doctrine on intent and typical attribution configure a demanding procedural scenario. At Alonso Sala, our criminal lawyers specialized in child pornography work with a multidisciplinary team of computer forensic experts, international judicial cooperation specialists and cybersecurity experts to audit the digital chain of custody, challenge evidence obtained in jurisdictions with lower standards, articulate defenses based on absence of intent, and build procedural strategies aimed at acquittal, sentence suspension when Art. 80 CP circumstances concur, and minimization of devastating accessory consequences (Central Sex Offenders Registry, professional disqualification).

Limitation of Art. 189 CP: the Special Rule for Minor Victims (Art. 132.1 CP)

As an offence against the sexual freedom and indemnity of minors, the limitation period of Art. 189 CP is not counted from the date of the offence, but from the moment the victim turns 35 years old (Art. 132.1, second paragraph, CP); if the victim were to die before reaching that age, the count starts from the date of death. From that moment, the ordinary term applies according to the maximum penalty of each tier: production or the aggravated form (Art. 189.1.a and 189.2 CP, 5 to 9 years) prescribes after 10 years; distribution, facilitation, dissemination or mere possession (Arts. 189.1.b and 189.5 CP, maximum penalty of 5 years or less) prescribes after 5 years. This rule means that prosecution of these offences can remain open for several decades after they were committed.

Specialized Defense Services

Why Alonso Sala for Child Pornography Defense?

Because we know a positive HASH in Interpol's ICSE database doesn't equal a conviction. Because we understand the digital chain of custody is as vulnerable as an unencrypted ZIP file. And because we defend with equal technical intensity both the rights of the accused and the integrity of the evidence.

  • Specialist computer counter-forensics with in-house laboratory.
  • Real experience in international police operations (Europol/Interpol).
  • Strict chain of custody control from seizure.
  • Confidentiality and digital reputation management.

Other Sexual Offenses

Child Pornography in Spain: Complete Legal Defence Guide

Child pornography offenses in Spain are governed by Art. 189 of the Criminal Code, with penalties ranging from 3 months (simple possession) to 9 years in prison (aggravated production/distribution). Online grooming is separately criminalized under Art. 183 CP. These crimes are investigated with specialized digital forensic tools and international cooperation through Europol, Interpol, and the ICSE database. Defence requires both deep legal knowledge and technical digital forensic expertise.

Penalty Table: Art. 189 CP & Related Offenses

OffenseArticlePenalty
Production of child pornographic materialArt. 189.1.a5 – 9 years
Distribution / disseminationArt. 189.1.b1 – 5 years
Aggravated (victim <16, organization, profit)Art. 189.25 – 9 years
Facilitating minors' access to pornographyArt. 189.46 months – 1 year
Simple possession (personal use)Art. 189.53 months – 1 year
Grooming (online contact with sexual purpose)Art. 1831 – 3 years
Deceiving a minor into providing sexual materialArt. 183.26 months – 2 years

Critical Defence Strategies

Chain of Custody Challenge

If the seized device was handled without write blockers, stored without seal, or analyzed without documented protocols, the entire digital evidence can be invalidated. This is the most powerful defence tool available.

Absence of Intent (Dolo)

Possession requires knowledge and will. Automatic P2P downloads, browser cache files, and malware infections can all store illicit material without user knowledge. Forensic analysis proving involuntary storage is essential.

IP ≠ Person Identification

An IP address identifies a connection, not a person. Vulnerable WiFi networks (WEP, no password, WPS enabled), shared routers, and VPN usage all prevent conclusive identification of the downloader.

Reclassification: Distribution → Possession

P2P programs share files automatically (seeding). If the user was unaware of this mechanism, distribution charges can be reclassified as simple possession, reducing the penalty from 5 years to 1 year.

Key Supreme Court Rulings

Supreme Court doctrineCache files do not prove intentional possession

The Supreme Court established that files found exclusively in browser cache, without organization, renaming, or deliberate storage in personal folders, do not constitute the intentional possession required by Art. 189.5 CP. The prosecution must prove voluntary storage act.

Supreme Court doctrineSpecific judicial authorization for device search

The TS ruled that examining digital device contents requires a specific judicial order separate from the home search warrant (Art. 588 sexies a LECrim). Evidence obtained from computers found during a home search without specific device authorization is void.

Supreme Court doctrineP2P automatic sharing and distribution intent

The Court analyzed whether automatic seeding in P2P programs constitutes distribution. It held that if the accused can demonstrate unawareness of the sharing mechanism and low technical profile, distribution intent may not be proven, allowing reclassification to possession.

The Digital Forensic Process

1

Seizure

Device sealed on-site with photographs and chain of custody document initiated.

2

Forensic Cloning

Bit-by-bit copy using write blocker. SHA-256 hash generated for original and clone comparison.

3

Hash Comparison

File hashes compared against ICSE (Interpol) and NCMEC databases to identify known illicit material.

4

Timeline Reconstruction

System logs, user sessions, and file metadata analyzed to determine who, when, and how files arrived.

Child Pornography FAQ

What penalties does child pornography carry in Spain?
It depends on the modality: production with real minors carries 5-9 years (Art. 189.1.a CP); distribution or facilitation, 1-5 years (Art. 189.1.b CP); mere possession for personal use, 3 months to 1 year or fine (Art. 189.5 CP). Aggravating factors increase penalties significantly.
Is mere possession a crime even without sharing?
Yes. Possession for personal use is a crime under Art. 189.5 CP. Distribution is not required. However, the penalty is substantially lower, and defense can achieve sentence suspension with no prior record.
What if files were in my browser cache?
Possession requires intent. If files come from automatic browser downloads, pop-ups, or messaging groups, technical defense focuses on proving absence of acquisition will. Forensic computer analysis is the key evidence.
Does my IP address prove I did it?
Not directly. An IP identifies a router or internet line, not a specific person. If the wifi was vulnerable or multiple users had access, reasonable doubt about authorship exists.
Can police search my home?
Yes, with judicial authorization. Police present evidence to a judge who authorizes device seizure. It's critical that the defense attorney ensures chain of custody was respected from the outset.
What is grooming?
Grooming (Art. 183 CP) is contacting a minor under 16 via internet for sexual purposes or to obtain pornographic material. Punishable by 1-3 years imprisonment even without physical meeting.
Are AI-generated images a crime?
Art. 189.1 CP includes material that realistically represents minors in sexually explicit situations, covering computer-generated images, deepfakes, and AI material.
How is online child pornography investigated?
Investigations start from automated provider alerts (Google, Microsoft use PhotoDNA), P2P tracking, deep web operations, or reports. BIT and GDT are the specialized police units.
Do I need a specialized criminal lawyer?
Essential. Defense requires dual specialization: substantive criminal law (Art. 189 CP) and digital forensic evidence (disk analysis, metadata, chain of custody).
How does international cooperation affect these cases?
Investigations frequently involve Europol and Interpol. Servers may be in other countries, requiring international letters rogatory and mutual legal assistance treaties. Defense can challenge evidence obtained in jurisdictions with lower protection standards or without proper judicial oversight.
What are the consequences of Sex Offender Registry registration?
Registration in the Central Sex Offenders Registry (RD 1110/2015) prevents working with minors in any field (education, sports, leisure). Duration varies: 30 years for serious prison sentences, 20 years for less serious. It is a devastating accessory consequence that must be evaluated in the defense strategy.
Can cooperating with the investigation reduce the sentence?
Yes. Substantial cooperation with authorities to identify other suspects or rescue victims operates as an analogous mitigating factor (Art. 21.7 CP). Timing is key: the earlier the cooperation, the greater the mitigating effect. However, the decision to cooperate must always be taken with prior legal advice.
How much does a lawyer for a child pornography case cost?
There is no single fee: it depends on the procedural stage, the complexity of the case — the number of seized devices and the need for a forensic counter-expert report are decisive factors — and the court that will hear it. We set a fixed quote after studying the matter, so you know from the outset where you stand.
Do you act throughout Spain?
Yes. Although the firm is based in Madrid, we take on defenses before any court or tribunal in the country.

All pages in this practice area

Need urgent criminal defence?

Contact our specialist criminal defence lawyers. We evaluate your case confidentially.

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.