Stalking & Harassment in Spain: Legal Defence Guide
In this article
Key Takeaways
- Art. 172 ter.1 CP: prison of 3 months to 2 years or a fine of 6 to 24 months
- Especially vulnerable victim: prison of 6 months to 2 years
- Art. 172 ter.2 CP, partner, former partner or relative: prison of 1 to 2 years or 60 to 120 days of community service
- Art. 172 ter.5 CP: fake profiles using another person's image, prison of 3 months to 1 year or a fine of 6 to 12 months
- No proceedings without the victim's complaint (Art. 172 ter.4 CP), except within the scope of Art. 173.2 CP
- Less serious offence: time-barred after 5 years (Art. 131.1 CP)
Stalking is the harassment offence in Art. 172 ter of the Spanish Criminal Code: watching, following, contacting or misusing another person's data insistently and repeatedly, without legitimate authorisation, until it disrupts the normal course of their daily life. It carries imprisonment of three months to two years or a fine of six to twenty-four months, and more if the victim is vulnerable, a partner, former partner or relative.
Need help with your case? Talk to a criminal defence lawyer at Alonso Sala.
The offence of stalking or harassment is set out in Art. 172 ter of the Spanish Criminal Code (CP). It fills a gap: behaviour that, without amounting to threats or violent coercion, plunges the victim into constant distress through obsessive and persistent pursuit until it disrupts the normal course of their daily life. It is punished with imprisonment of three months to two years or a fine of six to twenty-four months, with higher penalties if the victim is especially vulnerable or is the offender's spouse or partner, former partner or a relative (Art. 173.2 CP).
The offence was introduced by Organic Law 1/2015, with effect from 1 July 2015. This guide covers both sides, the person reported and the person being harassed, including online (cyberstalking). For a specific case, see our page on criminal defence in stalking and harassment cases.
What exactly is stalking?
The Criminal Code does not use the English word: it punishes anyone who «acose a una persona» (unofficial translation: "harasses a person"). It is an offence against freedom, placed in the chapter on coercion, and it punishes a pattern of conduct rather than a one-off incident. In practice: waiting for the victim outside work, messaging them relentlessly, including through third parties, or placing orders in their name.
In everyday English, "stalking" someone can also mean looking at their profile on social media. Viewing someone's public profile, without addressing them, does not in itself fit the offence: there is no insistence directed at the victim and no disruption of their daily life. Writing to them from new accounts after being blocked is a different matter.
If you have been reported for stalking: what it means and what happens next
A complaint is not a conviction: the court will investigate whether the requirements of Art. 172 ter CP are met and, meanwhile, may protect the alleged victim. The essentials:
- A complaint is required from the aggrieved person or their legal representative (Art. 172 ter.4 CP), unless the victim is one of the persons listed in Art. 173.2 CP (a spouse or partner, current or former, children, parents and siblings, among others): for them, section 2 waives that requirement.
- The investigation lies with the Investigation Section of the Court of Instance (Tribunal de Instancia) or, if the victim is a woman and the person reported is or has been her partner, with the section that has jurisdiction over violence against women (Art. 14.5.a of the Criminal Procedure Act, LECrim).
- As the person under investigation, you will attend with a lawyer and may choose whether to make a statement, ideally after reviewing the complaint and its evidence.
- Precautionary measures: the judge may prohibit you from approaching or contacting the alleged victim (Art. 544 bis LECrim) and, if the victim is one of the persons in Art. 173.2 CP and there is an objective situation of risk, issue a protection order (Art. 544 ter LECrim). Breaching them is an offence in itself (Art. 468 CP); more detail in our complete guide to restraining orders.
- Withdrawing the complaint does not close the case: the victim's pardon only extinguishes criminal liability in minor offences prosecuted at the aggrieved party's request or where the law provides for it (Art. 130.1.5 CP), and stalking is not one of those cases.
The court will examine whether the facts fit the wording of the article:
Text of Art. 172 ter CP (unofficial translation)
Wording in force, from the consolidated text in the Boletín Oficial del Estado (BOE), Spain's official gazette, in our unofficial English translation, for guidance only: only the Spanish text is legally binding.
1. Anyone who harasses a person by carrying out, insistently and repeatedly and without being legitimately authorised, any of the following acts and, in this way, disrupts the normal course of that person's daily life shall be punished with imprisonment of three months to two years or a fine of six to twenty-four months:
1st. Watches them, pursues them or seeks physical proximity to them.
2nd. Establishes or attempts to establish contact with them through any means of communication, or through third parties.
3rd. Through the improper use of their personal data, acquires products or goods, or contracts services, or causes third parties to contact them.
4th. Attacks their freedom or their property, or the freedom or property of another person close to them. Where the victim is in a situation of special vulnerability by reason of age, illness, disability or any other circumstance, the penalty shall be imprisonment of six months to two years.
2. Where the offended party is one of the persons referred to in section 2 of Article 173, a penalty of imprisonment of one to two years, or community service of sixty to one hundred and twenty days, shall be imposed. In this case, the complaint referred to in section 4 of this article shall not be necessary.
3. The penalties provided for in this article shall be imposed without prejudice to those that may correspond to the offences in which the acts of harassment have materialised.
4. The acts described in this article may only be prosecuted upon a complaint by the aggrieved person or their legal representative.
5. Anyone who, without the consent of its holder, uses the image of a person to place adverts or open false profiles on social networks, contact pages or any means of public dissemination, thereby causing that person a situation of harassment, hounding or humiliation, shall be punished with imprisonment of three months to one year or a fine of six to twelve months. If the victim of the offence is a minor or a person with a disability, the upper half of the penalty shall be applied.
The key element: disruption of everyday life
Section 1 requires three elements at the same time:
- Insistent and repeated conduct. One unwelcome message is not enough: the conduct must be repeated insistently, for example despite silence or an express refusal.
- No legitimate authorisation. Actions covered by a legal authorisation fall outside the offence; a past relationship does not authorise anyone to watch the other person or to keep insisting.
- Disruption of the normal course of daily life. This is where many cases are decided. The clearest sign is that the victim has had to change their habits: their phone number, their route or their home, or going out only with company.
Until 6 October 2022, the text required the conduct to disrupt daily life «gravemente» (unofficial translation: "seriously"). Organic Law 10/2022 (fourth final provision) removed that adverb with effect from 7 October 2022: a serious disruption is no longer required, although mere annoyance is still not enough. Facts committed before that date are judged under the earlier wording, which required a serious disruption: the reform broadened the offence, and a criminal law only applies to earlier facts if it favours the accused (Arts. 1.1 and 2.2 CP; Art. 25.1 of the Spanish Constitution). Where the conduct began before that date and continued afterwards, the applicable wording has to be assessed case by case.
How repetition and the change in habits are proved
The law sets no minimum number of messages or encounters. The court looks at the whole picture: how many incidents, over what period, whether they continued after a refusal or a block and with what effect. The basic tool, for both sides, is a timeline with the date and time of each incident and the evidence for it:
- Communications: complete exported conversations, call logs and messages from accounts created after a block. A single screenshot can be challenged; it is reinforced by producing the device itself, by having the messages checked against the original before the court clerk (letrado de la Administración de Justicia) or by a digital forensic report.
- Witnesses to the waiting or the following.
- Recordings and history: cameras in a building entrance or a shop, and earlier requests or complaints asking for the contact to stop.
- Change in habits: a new phone number or lock, a house move, sick leave or a psychological report.
The defence looks there for two-way conversations or long periods without contact. Dates also matter for the limitation period. Digital evidence is covered in detail in our guide to cyberstalking on social media and the evidence it requires.
What penalties am I facing?
What each section of Art. 172 ter CP provides:
| Section | Conduct or situation | Penalty or rule |
|---|---|---|
| Art. 172 ter.1 | Insistent and repeated conduct that disrupts the victim's daily life | Prison of 3 months to 2 years or a fine of 6 to 24 months |
| Art. 172 ter.1, last sentence | Victim especially vulnerable by reason of age, illness, disability or any other circumstance | Prison of 6 months to 2 years |
| Art. 172 ter.2 | Victim within Art. 173.2 CP (spouse or partner, current or former, relatives and other members of the household) | Prison of 1 to 2 years or 60 to 120 days of community service; no complaint required |
| Art. 172 ter.3 | Acts of harassment that are also another offence (threats, damage, injuries…) | The penalties for those offences are imposed as well |
| Art. 172 ter.4 | Requirement for prosecution | Complaint by the victim or their legal representative, except under section 2 |
| Art. 172 ter.5 | Another person's image used without consent in adverts or fake profiles, causing harassment, hounding or humiliation | Prison of 3 months to 1 year or a fine of 6 to 12 months; upper half (prison of 7 months and 16 days to 1 year or a fine of 9 months and 1 day to 12 months) if the victim is a minor or has a disability |
All of these are less serious penalties, so stalking is a less serious offence (delito menos grave, Arts. 13.2 and 33.3 CP). As a result:
- It becomes time-barred after five years (Art. 131.1 CP). If the victim was a minor, the period starts to run when they turn eighteen (Art. 132.1 CP).
- Restraining orders: the judgment may ban approaching or contacting the victim for up to five years and, if prison is imposed, for one to five years longer than the prison term, served at the same time (Arts. 57.1 and 48 CP). The ban is discretionary, except that it is mandatory to ban approaching a victim within Art. 173.2 CP (Art. 57.2 CP).
Section 5: fake profiles and adverts using another person's image
Section 5 was added by the same Organic Law 10/2022, with effect from 7 October 2022. Typical examples are a contact advert using a former partner's photo or a dating profile with a colleague's picture. It differs from section 1 in three ways:
- No repetition required: the text does not ask for insistent and repeated conduct, so, in principle, a single advert or a single profile may be enough.
- A different result: it does not require a disruption of daily life, but causing a situation of harassment, hounding or humiliation.
- A lower penalty: imprisonment of three months to one year or a fine of six to twelve months, in its upper half if the victim is a minor or a person with a disability. That last rule was added by Organic Law 1/2023 of 28 February (second final provision), in force since 2 March 2023.
If the offender also impersonates the victim, other offences may come into play: see our guide to identity theft and fake profiles.
Differences from threats and coercion
Stalking must not be confused with them, nor with sexual harassment or degrading treatment. Each offence has its own guide:
| Offence | What it punishes | Difference from stalking |
|---|---|---|
| Threats (Arts. 169 to 171 CP) | Announcing a future harm to another person, with or without a condition | Stalking requires no announced harm; if the messages contain threats, those are punished as well (Art. 172 ter.3) |
| Coercion (Art. 172 CP) | Using violence to prevent someone from doing what the law does not prohibit, or to compel them to do what they do not want to do | Stalking requires neither violence nor imposing a specific course of conduct |
| Sexual harassment (Art. 184 CP) | Requesting sexual favours within a work, teaching or similar relationship, creating a seriously intimidating, hostile or humiliating situation | Requires sexual content and that kind of relationship |
| Street sexual harassment (Art. 173.4, second paragraph, CP) | Sexual expressions, behaviour or propositions that create an objectively humiliating, hostile or intimidating situation | It is a minor offence and requires no repetition |
| Degrading treatment (Art. 173.1 CP) | Degrading treatment that seriously undermines moral integrity, and repeated hostile acts at work or in housing | Protects moral integrity, not freedom |
If the court rules out Art. 172 ter but finds minor coercion, it may convict of the latter, as the offences are homogeneous, but only after warning the defence of that possible classification. The Supreme Court judgment of 4 March 2026 (appeal 3401/2025) set aside a conviction for minor coercion under Art. 172.2 CP imposed without that warning; see our post on reclassification without notice and the right to defence.
Cyberstalking and harassment on social media
The second form of conduct covers contact «a través de cualquier medio de comunicación» (unofficial translation: "through any means of communication"), so cyberstalking needs no offence of its own. Typical patterns: new accounts to write to someone who has blocked the sender, chains of messages through messaging apps or social media, and sign-ups to services in the victim's name (the third form).
If the surveillance is carried out with a location-tracking or monitoring app installed on another person's phone, there may also be an offence of disclosure of secrets under Art. 197 CP, explained in our guide to spyware and location tracking on a partner's phone. For the defence, a forensic examination of the devices can confirm or rebut who wrote the messages. More guidance in our guide to cyberstalking and digital harassment.
How a stalking accusation is defended
The defence usually rests on these points:
- Lack of repetition: isolated incidents, widely spaced, or with no continuity after the first refusal.
- Two-way communication: conversations in which both parties wrote to each other or resumed contact.
- No disruption of daily life: if the complainant's habits did not change, the result that the offence requires may be missing.
- Authorship: an account bearing the defendant's name does not prove that he or she runs it.
- Reason for the contact: messages needed to arrange, say, contact with the children are not assessed like those that only seek contact.
- Procedural issues: the lack of a complaint, the limitation period, the wording applicable before 7 October 2022 and reclassification without notice.
What to do (and what not to do) if you are accused of stalking or are being stalked
If you have been reported: do not contact the complainant, whether directly, through third parties or from other accounts: each attempt may be added to the accusation and, with a precautionary measure in place, is a breach of a court order. Do not delete conversations or accounts, prepare a timeline with your own screenshots, and do not make a statement before reviewing the case file with your lawyer.
If you are being stalked: do not reply; export complete conversations, note the date, time and link of each profile or post, and the changes you have had to make in your life. Report it to the police, the duty court or the Public Prosecutor's Office and, if you fear for your safety, ask for protection measures.
At Alonso Sala, with more than 15 years of experience in criminal law, we take on both the defence of people under investigation for this offence and the private prosecution (acusación particular) of those who suffer it. You can see how we work on our page on the offence of stalking or harassment, or call us on +34 91 078 65 74 for an initial assessment of your case.
Official text: article 172 ter of the Spanish Criminal Code (BOE)
Frequently asked questions
What is stalking and which article punishes it?
It is the harassment offence in Art. 172 ter of the Spanish Criminal Code (CP). It is committed by anyone who, insistently and repeatedly and without legitimate authorisation, watches or follows another person, seeks physical proximity to them, tries to contact them by any means or through third parties, uses their data so that others contact them, or attacks their freedom or property, and thereby disrupts the normal course of their daily life.
Is it a crime to stalk someone on social media?
It depends on what is done. Looking at another person's public profile from time to time is not, in itself, a crime. It becomes one when the conduct is directed at that person insistently and repeatedly (following them, waiting for them, writing from new accounts after a block, asking about them among their friends and family) and disrupts their daily life, for example by forcing them to change their phone number, routes or habits.
How many messages or incidents does it take for stalking to be a crime?
The law sets no number. It requires insistent and repeated conduct that disrupts the normal course of the victim's daily life. The court assesses the whole picture: how many incidents there were, over what period, whether they continued after a refusal or a block and what changes they caused. That is why a timeline with the date and time of each incident is so useful.
What penalties does the offence of stalking carry?
In the basic offence, imprisonment of three months to two years or a fine of six to twenty-four months. If the victim is especially vulnerable, imprisonment of six months to two years. If the victim is one of the persons in Art. 173.2 CP (a spouse or partner, current or former, children, parents, siblings and other members of the household), imprisonment of one to two years or sixty to one hundred and twenty days of community service. The judge may add bans on approaching and contacting the victim; in that family setting, the ban on approaching is mandatory.
Is a complaint required? Can it be withdrawn?
Yes, it is required: Art. 172 ter.4 CP requires a complaint from the aggrieved person or their legal representative, except where the victim is one of the persons in Art. 173.2 CP, in which case the offence is prosecuted without it. Once filed, withdrawing it does not close the case: the victim's pardon only extinguishes criminal liability in minor offences prosecuted at the aggrieved party's request or where the law provides for it (Art. 130.1.5 CP).
Is it a crime to create a fake profile with someone else's photo?
It can be. Art. 172 ter.5 CP punishes anyone who, without consent, uses a person's image to place adverts or open fake profiles on social media, contact pages or any means of public dissemination, causing them a situation of harassment, hounding or humiliation. The penalty is imprisonment of three months to one year or a fine of six to twelve months, in its upper half if the victim is a minor or has a disability.
How does stalking differ from threats and coercion?
Threats announce a future harm, and coercion uses violence to prevent someone from doing something or to compel them to do it. Stalking requires neither announcing a harm nor imposing a specific course of conduct: it punishes persistence that disrupts the victim's daily life. If threats, damage or other offences are also committed during the harassment, they are punished as well (Art. 172 ter.3 CP).
Can I be given a restraining order for stalking?
Yes. During the investigation, the judge may, as a precautionary measure, prohibit you from approaching or contacting the victim (Art. 544 bis of the Criminal Procedure Act, LECrim). In the judgment, the ban may last up to five years and, if prison is imposed, between one and five years longer than the prison term (Art. 57.1 CP). If the victim is a spouse or partner, current or former, or a relative within Art. 173.2 CP, the ban on approaching is mandatory (Art. 57.2 CP).
When does the offence of stalking become time-barred?
After five years, because it is a less serious offence (Art. 131.1 CP). If the victim was a minor, the period starts to run when they turn eighteen (Art. 132.1 CP).
Do you need criminal defence in this area?
We are criminal defence lawyers specialising in stalking offence. We act urgently to protect your rights.
This page is for information purposes only and does not constitute legal advice: every case requires individual assessment. How this content is produced and verified: editorial policy.