# Spain regulates the use of AI in courts

> Spain sets a restrictive framework for judges' use of AI: official systems only, no automated decisions and under human control
> By Alfredo Collosa · Artificial Intelligence · 2026-02-02

Spain has taken a decisive step in regulating the use of artificial intelligence in the judicial sphere. The Plenary of the General Council of the Judiciary (CGPJ) approved on 28 January the Instruction 2/2026, published in the Official State Gazette ([BOE)](https://www.boe.es/diario_boe/txt.php?id=BOE-A-2026-2205) on 30 January 2026, which establishes a restrictive and operational framework for the use of AI systems by judges and magistrates in Spain.

The rule sets as its central principle that only artificial intelligence tools provided by the competent Administration or by the CGPJ itself may be used. These must always operate under effective human control, have passed prior audits and, under no circumstances, may they adopt automated decisions. The instruction expressly stresses that AI cannot replace the jurisdictional function nor condition judicial independence.

## European and national regulatory context

The instruction is framed within **Regulation (EU) 2024/1689**, which classifies as high-risk artificial intelligence systems intended to be used by judicial authorities and requires reinforced guarantees of transparency, human oversight and technical quality.

**[Alfredo Collosa publishes a book on AI in the public sector](https://observatorioblockchain.com/ia/alfredo-collosa-publica-un-libro-sobre-la-ia-en-el-sector-publico/)**

At the national level, the rule connects with Royal Decree-Law 6/2023, on the digital transformation of Justice, and with the Statute of the Spanish Agency for the Supervision of Artificial Intelligence (AESIA), as well as with the controlled testing environment provided for in Royal Decree 817/2023. This framework regulates the supervision, prior testing and conformity assessment of AI systems considered high-risk.

## Guiding principles for the use of judicial AI

Instruction 2/2026 establishes a series of principles aimed at guaranteeing a use of artificial intelligence compatible with citizens' fundamental rights. First, **effective human control**is required, which means that AI systems cannot operate autonomously in the assessment of facts, evidence or in the interpretation of the Law. The final decision must always rest with the judge or magistrate.

Second, the rule enshrines the principle of non-substitution and judicial responsibility, establishing that full and exclusive responsibility for rulings lies with judges and magistrates, regardless of whether AI tools have been used as support.

The principles of independence, proportionality and bias prevention are also highlighted, requiring the avoidance of any conditioning of the freedom of judicial criteria and the adoption of specific measures to detect and mitigate possible algorithmic biases.

## Permitted systems and authorized uses

The instruction limits the use of AI in the jurisdictional function exclusively to systems provided by the Administration or by the CGPJ. Any other tool is prohibited, except for study uses with open sources and without incorporation of judicial data.

Authorized uses are limited and must always be carried out under effective human control and judicial responsibility. These include the search and location of legal information, such as the identification of relevant regulations, case law and doctrine, as well as the retrieval of procedural or documentary records.

The analysis, classification and structuring of information to support the study of cases is also permitted, including the organization of files through metadata or summaries. Likewise, the preparation of outlines, summaries or internal working drafts is authorized, provided they are not decision-making in nature nor replace the personal drafting of judicial rulings.

AI may also be used as support for organizational or auxiliary tasks related to the management of legal knowledge and the preparation of jurisdictional work.

Drafts generated by AI systems may be used as internal support, but require review, critical and personal validation by the judge or magistrate. Under no circumstances do they constitute automated decisions. The system must allow the draft to be generated only at the judge's will and to be fully modifiable.

## Quality control and prior audit

The instruction requires quality control and a prior audit by the CGPJ before the deployment of any AI system. The systems made available must undergo a prior technical evaluation verifying their suitability for jurisdictional purposes, including checks on accuracy, robustness, traceability and absence of relevant biases.

Likewise, the obligation to have a documentary and process audit is established. This implies having detailed technical documentation, such as model cards, data sheets, training records and version control, as well as procedures that allow auditing the complete life cycle of the system.

The rule also refers to the testing framework in controlled environments provided for in Royal Decree 817/2023, which suggests the carrying out of pilot tests and conformity assessments before any operational deployment.

## Expressly prohibited uses

Instruction 2/2026 establishes a series of explicit prohibitions to protect judicial independence and fundamental rights. The substitution, automation or delegation of judicial decision-making is prohibited, as well as the assessment of facts or evidence or the interpretation and application of the Law.

Any use that directly or indirectly conditions the independence or freedom of criteria of the judge is also prohibited. Content generated by AI may not be incorporated into rulings without critical, complete and personal validation.

The rule likewise prevents the processing by AI of especially protected personal data or information subject to reinforced confidentiality duties, except with express regulatory authorization. Profiling, behavior prediction, risk assessment or classification of subjects outside the cases expressly authorized by regulations is prohibited, as is the incorporation of judicial data into AI systems not provided by the Administration or the CGPJ.

## Non-permitted AI systems

The use of artificial intelligence systems, including generative AI tools, that have not been provided by the competent Administrations in matters of Justice or by the CGPJ is prohibited.

However, these systems may be used for preparation or study purposes, such as the preparation of summaries, translations or analysis of legal, doctrinal or technical sources, provided that the information used comes solely and exclusively from open sources. Under no circumstances may judicial data be incorporated into these systems.

## Protection of personal data

The instruction devotes a specific section to the protection of personal data. The use of AI systems must fully respect current regulations, guaranteeing the principles of lawfulness, fairness, transparency, data minimization, purpose limitation, accuracy, integrity and confidentiality.

Personal data accessed by judges and magistrates in the exercise of jurisdictional activity may not be used in AI systems that have not been provided by the Administration or by the CGPJ. The processing of personal data through AI may only be carried out when strictly necessary for the support or assistance purpose pursued and is proportionate, with mass or indiscriminate processing of judicial data being prohibited.

The systems used must incorporate adequate technical and organizational measures to guarantee data security, prevent unauthorized access, ensure the traceability of operations and prevent the reuse of information for purposes other than those authorized.

## Non-compliance, supervision and training

Non-compliance with the criteria, usage guidelines and principles established in the instruction may give rise to the corresponding liabilities, in accordance with the provisions of the Organic Law on the Judiciary, without prejudice to the adoption of preventive or corrective measures in the organizational or governance sphere of the Judiciary.

The CGPJ will exercise the functions of supervision and control of the use of AI systems in everything that affects the processing of personal data for jurisdictional purposes. In addition, the Council will offer judges and magistrates specific training and capacity-building activities on the use of artificial intelligence in the Administration of Justice.
