
Cyber Sexual Harassment Lawyer (Arts. 172 ter & 183 CP)
Criminal defense against charges of sexual harassment through digital means: social media, messaging and dating apps.
Last updated:
Cyber Sexual Harassment: Concept
Cyber sexual harassment is the set of sexual harassing, intimidating or pursuing conducts carried out through digital means: social media, instant-messaging apps, dating platforms, forums, chat rooms, gaming platforms and streaming services. Its criminal classification in Spanish law depends on the elements present and the victim's age, spread across several offences with different penalties and protected interests.
Applicable Offences
Cyber sexual harassment may engage several offences that can concur: the stalking offence (Art. 172 ter CP) where the conduct is repeated and seriously alters the victim's daily life (3 months to 2 years); grooming (Art. 183 CP) where an adult contacts a child under 16 to arrange a sexual encounter (1 to 3 years); threats (Art. 169 CP); coercion (Art. 172 CP); and the discovery and disclosure of secrets (Art. 197 CP), including the non-consented distribution of intimate images (Art. 197.7 CP).
Forms of Cyber Sexual Harassment
The most frequent forms include: the repeated sending of unsolicited sexual content; the creation and use of fake profiles to contact or impersonate the victim; the spreading of sexual rumours in the victim's social, work or educational circles; the obsessive monitoring of the victim's profile with disturbing interactions; threats to disseminate intimate content (sextortion); doxing, or the publication of the victim's personal data; the capture and humiliating distribution of screenshots; and the creation or sharing of sexual deepfakes using the victim's image.
Grooming under Article 183 CP
Grooming protects children under sixteen from online approaches for a sexual purpose. It punishes, with one to three years' imprisonment, a person who contacts a child under 16 through information and communication technologies and proposes a meeting with the purpose of committing a sexual offence, where the proposal is accompanied by material steps towards the approach. The aggravated subtype applies where there is prevalence, deception or coercion.
Evidence and Chain of Custody
Proving cyber sexual harassment raises specific technical challenges. The defense addresses material authorship (effective identification of the user behind the account; shared or impersonated accounts), the authenticity and integrity of messages and screenshots, the chain of custody of the digital evidence, the lawfulness of how it was obtained, and the completeness of the communicative context (selected messages can distort the reading).
Defense Strategy
- Repetition required by Article 172 ter CP.
- Material authorship where accounts are shared or impersonated.
- Sexual purpose of the contact in grooming cases, and reasonable mistake as to age where the profile showed an adult appearance.
- Challenge to digital evidence for lack of chain of custody or irregular obtaining.
Procedure and competent court: how online sexual harassment is handled
The procedural track depends on the charge and the abstract penalty. Persistent harassment carried out through digital means is channelled into Article 172 ter of the Criminal Code (three months to two years in prison, or a fine of six to twenty-four months), which as a rule is investigated and tried by the Criminal Court, since the penalties fall at or below five years. Where the conduct escalates into a sexual assault involving carnal access under Article 179 (four to twelve years, or six to twelve where violence or intimidation is present), trial competence shifts to the Provincial Court.
There is a specific competence rule that should be anticipated from the outset. Where the accused and the complainant are, or were, partners or spouses, the case is investigated by the Court on Violence against Women under Article 87 ter of the Organic Law of the Judiciary, which changes the allocation, the time limits and the available precautionary measures. Correctly identifying the competent court from the complaint onwards avoids nullities, delays caused by jurisdictional transfers and the loss of procedural opportunities for the defence.
The investigation phase concentrates the decisions that shape the rest of the case: the taking of statements, the pre-constitution of evidence with minors, victim protection measures and the securing of digital evidence. Early technical involvement makes it possible to define the scope of the accusation, screen out unnecessary measures and prepare the position of the person under investigation with rigour, without any detriment to the victim.
The consent framework after LO 10/2022 and LO 4/2023
Organic Law 10/2022 merged the former figures of abuse and assault into a single offence of sexual assault built on the absence of consent. Article 178 provides that consent exists only when freely expressed through acts that clearly convey the person's will. The basic offence carries one to four years in prison; where violence or intimidation is present, or the victim's will is overridden by any cause, the penalty is one to five years. Organic Law 4/2023 readjusted the penalties to reinforce the response in the most serious cases.
Article 178.2 treats as sexual assault any acts committed on a person who is unconscious or whose will is overridden by any cause, which includes cases of chemical submission. Two levels must be distinguished with precision: an overridden will forms part of the offence itself, whereas the deliberate use of medication, drugs or other substances to override the victim's will operates as an aggravating circumstance under Article 180.1.7, which substantially raises the sentencing range.
For the defence, the shift of the axis towards consent calls for a careful analysis of the evidence on how the will was expressed and in what context. This is not about questioning the victim, but about verifying that the charge matches the proven facts, that the conduct is correctly classified under the right offence, and that the guarantees of presumption of innocence and proportionality in sentencing are respected.
Evidence: corroborated testimony, forensic, toxicological and digital proof
In offences of this kind the complainant's testimony may carry evidential weight, but case law requires that it be assessed under parameters of credibility, persistence and, importantly, the presence of objective corroborating evidence. The defence works precisely on the soundness of that corroboration, without resorting to revictimisation or strategies aimed at personal discredit, focusing on the internal consistency of the account and how it contrasts with the rest of the evidence.
Expert evidence is decisive. The forensic medical report documents findings and injuries; in cases of chemical submission, toxicological analysis is critical, with the caveat that many substances have very short detection windows, which makes the chain of custody and the timing of sampling essential to assess. On the digital side, the traceability of messages, metadata, connection logs and device images must be obtained with judicial authorisation and complete custody in order to preserve its validity.
Examining the chain of custody, the integrity of forensic device images and the proper authentication of conversations is a central line of defence in online harassment. A rigorous analysis of the digital evidence can reveal tampering, mistaken attribution of authorship or breaches of fundamental rights in the way it was obtained, any of which may lead to the exclusion of the material or to the loss of its evidential force.
Limitation periods, consequences and ways of ending the case
Limitation periods are calculated under Article 131 according to the maximum penalty for the offence (five, ten, fifteen or twenty years). There is a special rule in Article 132.1: where the victim of an offence against sexual freedom was a minor, the period does not begin to run until the victim turns thirty-five, or from their death if it occurs earlier. This rule very significantly extends the time during which the facts may be prosecuted and must always be weighed when assessing the temporal viability of a case.
A conviction for these offences carries consequences beyond the prison sentence. Article 192 imposes, after the sentence has been served, a supervised release measure of one to five years for less serious offences and five to ten years for serious ones, in addition to specific bans on holding office or working in certain roles. To this is added registration in the Central Registry of Sex Offenders, with effects that restrict access to professions and activities involving regular contact with minors.
In response to the charge, reparation of the harm and, where appropriate, a guilty-plea agreement may be considered, which can be reflected as mitigating circumstances in sentencing, without this implying any admission of unproven facts or a waiver of the presumption of innocence. It is also worth delimiting the boundary with neighbouring offences, such as threats under Articles 169 to 171 or the non-consensual disclosure of intimate images under Article 197.7, and distinguishing the criminal plane from any administrative or civil reproach.
Penalties & Consequences: Cyber Sexual Harassment Lawyer (Arts. 172 ter & 183 CP)
| Type / Scenario | Criminal Penalty |
|---|---|
| Stalking | Art. 172 ter CP: 3 months to 2 years' imprisonment for repeated harassment. |
| Grooming | Art. 183 CP: 1 to 3 years where the victim is under 16. |
| Image sharing | Art. 197.7 CP: non-consented distribution of intimate images, with cumulative penalties. |
* Penalties shown are indicative. The actual penalty depends on case circumstances, applicable mitigating and aggravating factors.
Sexual Offenses and Gender Violence in Spain: Legal Defense Guide
Sexual offenses in Spain are governed by Art. 178-194 of the Criminal Code, significantly reformed by Organic Law 10/2022 (the "Only Yes Means Yes" law) and its subsequent correction by LO 4/2023. Gender violence offenses — one of Spain's most prosecuted areas — are found in Art. 153-173 CP, with special aggravated penalties when the victim is an intimate partner.
Penalty Table: Sexual Offenses (Post-2023 Reform)
| Offense | Article | Penalty |
|---|---|---|
| Sexual assault (basic) | Art. 178 | 1 – 4 years |
| Sexual assault with penetration | Art. 179 | 4 – 12 years |
| Aggravated sexual assault | Art. 180 | 7 – 15 years |
| Child sexual abuse (under 16) | Art. 183 | 2 – 15 years |
| Child pornography (holding) | Art. 189.5 | 3 months – 1 year |
| Gender violence (minor assault) | Art. 153.1 | 6 months – 1 year |
| Stalking / Harassment | Art. 172 ter | 3 months – 2 years |
Critical Defense Strategies
Consent Analysis (Only Yes Means Yes)
Post-reform, consent must be explicit and ongoing. Defense focuses on context, prior relationship history, and how withdrawal of consent was expressed.
False Allegations Defense
False accusations are frequent in custody disputes. Challenge credibility with inconsistencies between statements, phone/message evidence, and expert psychological assessment.
Digital Evidence Review
WhatsApp messages, social media interactions, and digital footprint often contradict prosecution narratives. Comprehensive digital forensics analysis is essential.
Challenging the Expertise Reports
Psychological victim assessments used in court are frequently challenged on methodological grounds. Expert counter-reports are a cornerstone of defense.
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.