Skip to content
AS
Alonso Sala
CRIMINAL LAWYERS
ES
Legal Analysis

Organic Law 4/2023: Gender Identity and Hate Crimes

calendar_todayJune 20, 2026

Last updated:

lightbulbKey Takeaways

  • check_circleArt. 22.4 CP: aggravating factor for gender identity and expression
  • check_circleArt. 510 CP: hate crimes extended to trans and LGBTI people
  • check_circleAligns the criminal-law protection of protected groups
  • check_circleThe hate crime requires proof of the discriminatory motive
  • check_circleKey limit: freedom of expression

Quick answer

Organic Law 4/2023, of 27 April, strengthened the Penal Code by expressly including sexual identity, gender expression and gender-based reasons as discriminatory motives. It did so in two key places: the general aggravating factor in Article 22.4 CP, which increases the penalty for any offence committed on those grounds, and the hate crimes in Article 510 CP. The aim was to bring the criminal-law protection of trans and LGBTI people into line with that already afforded to other protected groups.

Organic Law 4/2023, of 27 April, on the real and effective equality of trans people and the guarantee of the rights of LGBTI people (BOE-A-2023-10405), is best known for its civil and administrative dimension. But it also contains significant criminal-law content: it strengthens the discrimination aggravating factor in Article 22.4 CP and broadens the hate crimes of Article 510 CP to expressly include sexual identity, gender expression and gender-based reasons. As criminal defence lawyers, we explain what changed, its practical scope and what it means today for a person under investigation, an accused, or a victim.

What the reform changed and why

For years the Spanish Penal Code has protected certain groups against discriminatory conduct. Organic Law 4/2023 does not invent that protection: it completes and clarifies it. Its stated aim is to bring the criminal-law protection of trans and LGBTI people into line with that already enjoyed by other groups, removing interpretive doubts about whether gender identity was covered by the existing clauses.

To that end the reform operates on two levels of the Penal Code:

  • The general discrimination aggravating factor of Article 22.4 CP, which can increase the penalty for any offence.
  • The hate crimes of Article 510 CP, which independently punish certain forms of incitement or disparagement.

The result is that the concepts of sexual identity, gender expression and gender-based reasons now appear expressly among the criminally relevant discriminatory motives, in line with the case law of the Constitutional Court and the European Court of Human Rights on protecting minorities against hate speech.

The discrimination aggravating factor: Article 22.4 CP

Article 22.4 CP sets out a general aggravating circumstance: committing the offence for discriminatory reasons. Where it applies, the court must take that motivation into account to increase the penalty within the statutory range of the underlying offence (assault, threats, criminal damage, coercion, and so on).

The list of motives in Article 22.4 CP is broad and includes reasons such as ideology, religion or beliefs, membership of an ethnic group, race or nation, sex, sexual orientation or identity, illness or disability. Organic Law 4/2023 reinforced this catalogue by expressly adding sexual identity, gender expression and gender-based reasons.

The practical consequence is direct: if an assault, a threat or an act of vandalism is committed out of aversion towards the victim's trans or LGBTI status, that motive can increase the penalty of the underlying offence. The aggravating factor does not create a new offence; it modulates the criminal response to the offence already committed.

Hate crimes: Article 510 CP

Article 510 CP punishes, in essence, two broad sets of conduct when directed against protected groups for discriminatory reasons:

  • Public incitement to hatred, hostility, discrimination or violence against a group or its members.
  • Acts of humiliation, disparagement or discredit, as well as the glorification or justification of offences committed against those groups.

Organic Law 4/2023 broadened the protected motives of Article 510 CP to include sexual identity, gender expression and gender-based reasons. As a result, hate speech aimed at trans and LGBTI people is now expressly covered by the offence, without having to stretch the interpretation of clauses designed for other groups.

It is worth stressing what Article 510 CP does not punish. It does not target opinion or criticism, however uncomfortable or minority. It targets conduct that creates a climate of hostility or that incites discrimination or violence. The boundary between the offence and the legitimate exercise of freedom of expression is precisely where these cases are won or lost.

Practical scope of the reform

In day-to-day court practice, the reform translates into several concrete effects:

  • Greater clarity of the offence: there is no longer any need to debate whether trans status or gender expression fit the Penal Code's motives; they appear expressly.
  • Aggravation of common offences: assaults, threats or damage may have their penalty increased under Article 22.4 CP when the discriminatory motive is proven.
  • Independent prosecution of hate speech: certain campaigns, posts or messages may fall within Article 510 CP, especially in the digital environment.
  • Greater focus on proof of motive: as the protected motives become clearer, the heart of the debate shifts to whether that motivation truly existed.

You can review other reforms analysed by the firm in our criminal law reforms section, where we explain the practical impact of each legislative change.

Hate speech in the digital environment

A large share of the cases now reaching the courts under Article 510 CP originate on social media, forums, messaging groups and video platforms. The reform introduced by Organic Law 4/2023 is especially relevant here, because the public reach and virality of a message can multiply its harmful potential.

Some points worth bearing in mind in the digital context:

  • Publicity and dissemination: Article 510 CP punishes public incitement; the open nature of a post or its mass dissemination can be decisive for the classification.
  • Authorship and evidence: identifying the true author of a message, distinguishing between accounts, screenshots and forwards, and correctly preserving electronic evidence is essential both to prosecute and to defend.
  • Context of the message: the same text may be opinion, satire or incitement depending on the context, tone and intent; the analysis cannot be reduced to isolated words.
  • Forwards and comments: sharing or commenting on someone else's content does not always mean adopting it as one's own; criminal liability requires the defendant's own conduct and motive.

For that reason, in these cases the work on the electronic evidence and on the sender's true intent is just as important as the legal analysis of the offence.

What it means today for a suspect, an accused, or a victim

For the person under investigation or accused, the express inclusion of these motives raises the risk that an act will be classified with the aggravating factor of Article 22.4 CP or as a hate crime under Article 510 CP. This requires analysing two things from the outset: whether the conduct genuinely fits the offence, and whether there is proof of the discriminatory motive or whether it is being inferred automatically from the outcome.

For the victim, the reform strengthens the procedural position: it offers a clear legal framework to report assaults, threats or hate campaigns based on their gender identity or expression, and allows the discriminatory motivation to have criminal consequences. A well-documented complaint — messages, witnesses, context — is decisive in proving the motive.

In both cases, the legal classification is not automatic: it depends on the specific facts, the context and, above all, the evidence.

Lines of defence

A defence against a charge of a hate crime or the Article 22.4 CP aggravating factor is usually built around several axes:

  • Absence of a discriminatory motive: Article 510 CP and the aggravating factor require proof that the perpetrator acted out of aversion towards the protected group. If the conflict had another cause (a personal, neighbourly or financial dispute), the subjective element falls away.
  • Freedom of expression: punishable hate speech must be distinguished from opinion, criticism or satire protected by Article 20 of the Constitution. Not every disagreeable or unfortunate statement is an offence.
  • Conduct not meeting the offence: analysing whether the facts truly reach the threshold the offence requires (relevant incitement, humiliation or disparagement), ruling out expansive interpretations.
  • Insufficient evidence: the motive cannot be presumed from the mere outcome; it is for the prosecution to prove it beyond reasonable doubt.
  • Non-retroactivity: checking the date of the acts, since the aggravation introduced by Organic Law 4/2023 does not apply to conduct prior to its entry into force (Article 2.1 CP).
  • Possible mitigating factors: depending on the case, reparation of harm (Article 21.5 CP) or confession (Article 21.4 CP) may modulate the criminal response.

Each case requires an individual study of the account of the facts, the available evidence and the context in which the statements or conduct occurred. The correct classification — and the proof or absence of the discriminatory motive — makes the difference between an aggravated conviction and an acquittal or a more lenient classification.

Conclusion

Organic Law 4/2023 consolidated the criminal-law protection of trans and LGBTI people in the Penal Code, giving express legal backing to sexual identity, gender expression and gender-based reasons both in the aggravating factor of Article 22.4 CP and in the hate crimes of Article 510 CP. The reform does not extend criminal liability without limit: the hate crime still requires a proven discriminatory motive and respects the limit of freedom of expression. Understanding that boundary is essential both for those facing an accusation and for those who have been victims of hate conduct.

Under investigation for a hate crime or a victim of discrimination?

Hate-crime proceedings turn on proof of motive and on its boundary with freedom of expression. An early technical assessment is decisive. Call us for a first confidential consultation.

Contact us now: 91 078 65 74

Frequently asked questions

What did Organic Law 4/2023 change in the Penal Code?expand_more

It expressly added sexual identity, gender expression and gender-based reasons to the discriminatory motives in Article 22.4 CP (the general aggravating factor) and in Article 510 CP (hate crimes). It did not create new offences: it broadened and clarified motives already recognised for other groups.

What is the discrimination aggravating factor of Article 22.4 CP?expand_more

It is a circumstance that increases the penalty for any offence when it is committed for discriminatory reasons (racist, antisemitic, on grounds of ideology, religion, sexual orientation or identity, gender expression, gender-based reasons, illness or disability, among others). After Organic Law 4/2023 it expressly includes gender identity and expression.

Is any offensive remark a hate crime?expand_more

No. Article 510 CP requires proof of a discriminatory motive and conduct that incites hatred, hostility, discrimination or violence, or that humiliates or disparages a protected group. Criticism, an uncomfortable opinion or a tasteless joke are not, on their own, hate crimes: freedom of expression is a significant constitutional limit.

What must be proven to convict for a hate crime?expand_more

The prosecution must establish both the objective element (the conduct described in Article 510 CP) and the subjective element: the discriminatory motive. It is not enough that the outcome offends someone; it must be shown that the perpetrator acted out of aversion towards the protected group. That burden of proof is the main line of defence.

Does the reform apply to acts committed before it took effect?expand_more

Unfavourable criminal law is not retroactive (Article 2.1 CP and Article 25.1 of the Spanish Constitution). The aggravation introduced by Organic Law 4/2023 applies only to acts committed after it came into force. Earlier acts are governed by the prior, more favourable, law.

front_hand

gavelDo you need criminal defense in this area?

We are criminal defense lawyers specializing in hate crimes. We act urgently to protect your rights.

View expertisearrow_forward
history_edu

Legislative reform discussed

Organic Law 4/2023, of April 27, on real and effective equality of trans persons and LGBTI rights guarantees

See the summary of this reform, the Criminal Code articles affected and the BOE link on our criminal-law reforms page.

history_eduView the reform· BOE-A-2023-10405arrow_forward

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