Legal AI

Algorithms and non-discrimination: what Article 23 of Law 15/2022 asks

The comprehensive equal treatment law devotes its Article 23 to artificial intelligence and automated decision-making mechanisms. Its mandates are aimed mainly at public administrations, but its rules on burden of proof and redress apply to any discrimination, including that caused by an algorithm.

Editorial photo: algorithms and non-discrimination
Image generated with AI

Long before the European Artificial Intelligence Regulation began to apply, a Spanish law already spoke of algorithms. Law 15/2022 of 12 July, comprehensive for equal treatment and non-discrimination, published in BOE no. 167 of 13 July 2022, devotes its Article 23 to artificial intelligence and automated decision-making mechanisms.

The article is short and its mandates are, in large part, promotional. But it is worth knowing, because it combines with rules of the same law that do have direct consequences in a lawsuit.

What Article 23 says

In short, the article contains four mandates:

  1. Public administrations must encourage mechanisms so that the algorithms involved in decision-making take into account criteria of bias minimisation, transparency and accountability, where technically feasible. This includes promoting impact assessments to detect possible discriminatory biases.
  2. Public administrations must prioritise transparency in the design and application of algorithms and the interpretability of the decisions they make.
  3. Administrations and companies must promote ethical, trustworthy artificial intelligence that respects fundamental rights.
  4. A quality seal for algorithms must be promoted.

That is: the most concrete obligation falls on the public sector, while for companies the article is framed as a duty to promote.

Why it matters even without direct penalties

Article 23 is not isolated. The same law:

  • Includes artificial intelligence among the areas where it applies, together with employment as an employee or self-employed, education, health or access to goods and services, including housing (Article 3).
  • Protects against discrimination on a wide catalogue of grounds, such as racial or ethnic origin, sex, age, disability, health status, socio-economic situation or any other personal or social condition (Article 2).
  • Reverses the burden of proof (Article 30): if the person alleging discrimination provides well-founded indications, the other party must justify objectively and reasonably its measures and their proportionality.
  • Presumes non-pecuniary damage once discrimination is proven (Article 27).

For a lawyer, the combination is relevant. If an automated decision, for example in a recruitment process or in granting a service, produces a discriminatory result, the affected person's defence can rely on statistical or operational indications, and it will be the company or administration that has to justify the system. For that it will need documentation on how it works, which is precisely what Article 23 promotes.

The new Authority

Since 26 July 2026, the Statute of the Independent Authority for Equal Treatment and Non-Discrimination, approved by Royal Decree 606/2026, has been in force. It can investigate, mediate and bring court actions, as we explain when analysing its Statute and functions. Its functions reach any discrimination within the scope of the law, including that which may arise from the use of algorithms.

How it fits with other rules

Article 23 coexists with other rules that also deal with automated decisions:

What a firm can do

  1. Ask clients what decisions they make with the help of automated systems and with what data.
  2. Recommend impact assessments and documentation of the systems, even though Article 23 only imposes them as promotion.
  3. Keep the reversal of the burden of proof in mind when advising on recruitment, pricing or access to services.

More analysis in Legal AI.

Fuentes

  1. Ley 15/2022, de 12 de julio, integral para la igualdad de trato y la no discriminación (BOE-A-2022-11589, texto consolidado). Accessed 18 October 2026.
  2. Real Decreto 606/2026, de 22 de julio, por el que se aprueba el Estatuto de la Autoridad Independiente para la Igualdad de Trato y la No Discriminación (BOE-A-2026-16172). Accessed 18 October 2026.

The specific data in this article come from the official sources cited.

Agente Lex Newsroom Redacción

Editorial team of AGENTE LEX. We produce analysis and news for the legal profession from public and official sources, which we link at the end of each article.

View profile and articles →