Skip to content
AS
Alonso Sala
CRIMINAL LAWYERS
ES
Legal Analysis

Cyber Sexual Harassment in Spain: Which Offences Apply and How to Defend (Art. 172 ter CP)

calendar_todayJune 20, 2026

Last updated:

lightbulbKey Takeaways

  • check_circleCyber sexual harassment is not a single offence: it covers several crimes
  • check_circleMain axis: stalking under Art. 172 ter CP (three months to two years or a fine)
  • check_circleGrooming (Art. 183), sextortion (Art. 169) and sharing intimate images (Art. 197.7)
  • check_circleRepetition is the core element of stalking: an isolated episode is not enough
  • check_circleDefence: real authorship, full context and lawful digital evidence

Quick answer

Cyber sexual harassment is not a standalone offence: it is an umbrella for offences that concur depending on the facts. The most common is the stalking offence of Article 172 ter CP (three months to two years in prison or a fine), alongside grooming (Art. 183), sextortion (Art. 169), sharing intimate images (Art. 197.7) and sexual harassment (Art. 184).

Cyber sexual harassment describes sexual harassment carried out through the internet, social media and messaging. It is worth clarifying from the outset: the Spanish Criminal Code contains no standalone offence called "cyber sexual harassment". What practice groups under that label is an umbrella of several criminal offences that may concur depending on the specific facts and the age of the victim. As criminal defence lawyers in cyber sexual harassment, we explain which offences come into play, how they are distinguished, and what lines of defence are available against a charge that almost always rests on digital evidence.

Why It Is Not a Single Offence

The label "cyber sexual harassment" works as a descriptive category, not as a criminal offence. On the same set of facts, the classification may fall under one or several different offences, with different penalties and elements:

  • Stalking (Article 172 ter CP): the main axis, where the harassment is insistent and repeated.
  • Grooming of minors (Article 183 CP): where the victim is under sixteen.
  • Threats (Article 169 CP): so-called sextortion, threatening to share intimate content.
  • Non-consensual sharing of intimate images (Article 197.7 CP): disseminating sexual material obtained with the victim's consent.
  • Sexual harassment (Article 184 CP): requesting sexual favours within an employment, teaching or analogous relationship.

For that reason the first technical task is to identify precisely which offence or offences concur: the penalty, the limitation period and the entire defence strategy depend on it.

The Main Axis: Stalking under Article 172 ter CP

The stalking offence of Article 172 ter CP is the central figure in cyber harassment. It punishes anyone who, insistently and repeatedly and without lawful authorisation, harasses a person through one of the following acts, seriously altering the conduct of their daily life:

  • Watching, pursuing or seeking physical proximity to them.
  • Establishing or attempting to establish contact with them through any means of communication or through third parties.
  • Misusing their personal data to acquire goods, contract services or have third parties contact them.
  • Attacking their freedom or property, or that of a person close to them.

The penalty is three months to two years in prison or a fine of six to twenty-four months. The core element is repetition: the offence requires a sustained pattern of conduct that seriously alters the victim's daily life. An isolated message, a call or a one-off episode, however distressing, does not on its own make out the offence.

When the Victim Is a Minor: Grooming (Art. 183 CP)

Where the victim is a minor under sixteen, the grooming offence of Article 183 CP comes into play. It punishes anyone who, through the internet, the telephone or any information and communication technology, contacts a minor under sixteen and proposes a meeting in order to commit a sexual offence, provided the proposal is accompanied by material acts directed at the approach.

The penalty is one to three years in prison or a fine, imposed in its upper half where the approach is obtained through coercion, intimidation or deceit. The defence in these cases examines three elements closely: the sexual purpose of the proposal, the existence of material acts of approach (conversation alone is not enough) and genuine knowledge of the victim's age, which may give rise to a defence of mistake.

Sextortion: Threats under Article 169 CP

Sextortion — threatening to share images or videos of a sexual nature to obtain money, more material or sexual relations — fits within the offence of threats under Article 169 CP. Where the threat is conditional (something is demanded in exchange for not sharing) and the offender achieves their purpose, the penalty can reach one to five years in prison; where they do not, the penalty is lower.

Sextortion frequently concurs with other offences: if the offender actually shares the intimate material without consent, Article 197.7 CP may be added; and if the conduct forms part of a sustained pattern of harassment, Article 172 ter CP. The precise classification and the possible finding of a concurrence of offences make a very significant difference to the penalty.

Sharing Intimate Images (Art. 197.7 CP)

Article 197.7 CP punishes anyone who, without the affected person's authorisation, shares, reveals or transfers to third parties images or audiovisual recordings of an intimate nature that had been obtained with their consent in a home or a place beyond the reach of third parties, where the disclosure seriously undermines their privacy. The penalty is three months to one year in prison or a fine of six to twelve months, imposed in its upper half, among other cases, where the victim is the offender's partner or former partner, where the victim is a minor, or where there is a profit motive.

The provision requires that the material had been obtained with the victim's consent: the reproach lies not in how the image was obtained, but in its non-consensual disclosure. Where the content was captured without consent, or where it depicts a minor, the classification may shift to other provisions.

The Sexual Harassment Offence of Article 184 CP

Where the online harassment consists of requesting sexual favours within an employment, teaching, service-provision or analogous relationship, and causes the victim an objectively and seriously intimidating, hostile or humiliating situation, the facts may make out the sexual harassment offence of Article 184 CP. The basic offence carries six months to twelve months in prison or a fine, with aggravated brackets where the offender abuses a position of superiority. Unlike the stalking of Article 172 ter CP, the decisive element here is that contextual relationship between offender and victim and the sexual content of the request.

Digital Evidence Is the Centre of the Case

These offences are almost always built on electronic evidence: screenshots, messaging, profiles and accounts, access logs, IP addresses, traffic data and computer forensic reports. That same evidence is the principal terrain of the defence, which pays attention to:

  • Real authorship. An account or an IP address identifies a profile or a connection, not necessarily a person. Shared, spoofed or hacked accounts and the use of common networks raise reasonable doubts about who carried out the acts.
  • The full context of the exchanges. A screenshot may be cropped, taken out of context or edited; the complete conversation may reveal reciprocity, irony or a meaning different from the one attributed to a fragment.
  • The lawfulness of how the evidence was obtained and its chain of custody, under Article 11.1 of the Organic Law of the Judiciary, with possible nullity of evidence gathered in breach of safeguards.

Lines of Defence

The defence against a charge of cyber sexual harassment is built on verifiable lines that depend on the specific offence charged:

  • Absence of repetition. Article 172 ter CP requires a sustained pattern; isolated episodes do not make out the stalking offence.
  • Disputing authorship, in line with the points made on digital evidence.
  • In grooming cases, the absence of a sexual purpose or of material acts of approach, and reasonable mistake about the victim's age.
  • Placing the exchanges in context, against partial or out-of-context screenshots.
  • Challenging evidence obtained in breach of safeguards or with a broken chain of custody.

Each case calls for its own technical and legal analysis, without anticipating outcomes and with the utmost discretion.

Concurrence of Offences, Accumulated Conduct and Precautionary Measures

A feature of cyber sexual harassment is that it rarely presents as a single, clean offence. Typically a single episode combines several acts over time: repeated messages pointing to the stalking of Article 172 ter CP, a conditional threat triggering Article 169 CP and, finally, the sharing of intimate material under Article 197.7 CP. In such cases the rules on concurrence of offences take centre stage, determining how the penalties are added or absorbed, which the defence analyses closely to avoid double reproach for the same facts.

Equally relevant is the treatment of the conduct preceding the complaint. Whether the sustained pattern required for stalking exists is not assessed message by message, but across the whole, which requires a chronological reconstruction of the entire interaction between the parties. The defence therefore insists on the complete export of the conversations, not merely the fragments selected by the prosecution, which can give a skewed picture of what happened.

Alongside the merits, these proceedings often involve precautionary measures protecting the alleged victim, such as a ban on approaching or on communicating by any means, including digital ones. Their request, their proportionality and any modification or lifting form part of the defence's work from the first steps of the case, with the same rigour as the analysis of the offence itself.

Criminal Defence in Cyber Sexual Harassment

The criminal-law firm Alonso Sala, based in Madrid (calle Velázquez 27) and acting throughout Spain, takes on the defence in proceedings for cyber sexual harassment and the offences that may concur: stalking, grooming, threats, the sharing of intimate images and sexual harassment. We identify precisely which offences are charged, design an evidential strategy focused on digital evidence, and also advise victims. You can read more about this service on our page on criminal defence for cyber sexual harassment.

Frequently asked questions

Is there an offence called cyber sexual harassment as such?expand_more

No. The Spanish Criminal Code contains no standalone offence called "cyber sexual harassment". What practice groups under that label is the concurrence of several offences depending on the facts and the age of the victim: the stalking offence of Article 172 ter CP as the main axis, the grooming of minors under Article 183 CP, the threats of Article 169 CP (sextortion), the non-consensual sharing of intimate images under Article 197.7 CP, and the sexual harassment of Article 184 CP. Precisely classifying which offence or offences concur is decisive for the strategy.

What does Article 172 ter CP punish?expand_more

It punishes anyone who, insistently and repeatedly and without lawful authorisation, harasses a person through conduct that seriously alters their daily life: watching them or seeking their proximity, establishing or attempting to establish contact through any means of communication, misusing their data to acquire goods or services, or attacking their freedom or property or that of someone close to them. The penalty is three months to two years in prison or a fine of six to twenty-four months. The core element is repetition: an isolated episode does not make out the offence.

Is threatening to share intimate photos a crime?expand_more

Yes. Threatening to share images or videos of a sexual nature to obtain something — money, more material or sexual relations — is what is known as sextortion and fits within the offence of threats under Article 169 CP. If the threat is conditional and the offender achieves their purpose, the penalty can reach one to five years in prison. The actual non-consensual sharing of the material may additionally engage Article 197.7 CP.

How is a cyber sexual harassment case proven?expand_more

Almost always on digital evidence: screenshots, messaging, account records, IP addresses and forensic reports. That evidence is also the centre of the defence. An IP address or an account does not, on its own, identify the offender (shared, spoofed or hacked accounts), screenshots may be out of context or manipulated, and the evidence must have been obtained respecting safeguards and the chain of custody under Article 11.1 of the Organic Law of the Judiciary.

What is the penalty for online grooming of minors?expand_more

Article 183 CP punishes anyone who contacts a minor under sixteen by technological means and proposes a meeting with a sexual purpose, where the proposal is accompanied by material acts of approach. The penalty is one to three years in prison or a fine, imposed in its upper half where the approach is obtained through coercion, intimidation or deceit. The defence examines the sexual purpose, the acts of approach and genuine knowledge of the victim's age.

Related Articles

View allarrow_forward

Knowledge is power, but strategy is key.

What you read here is just the beginning. Transform information into active defense by contacting our team of experts.

call