Cybercrime Law in Spain

Spain’s computer offences sit in its 1995 Criminal Code (Código Penal). A 2015 reform rewrote them to follow the EU directive on attacks against information systems, and a 2022 reform regrouped the fraud offences. Network-security law still rests on the 2018 NIS1 decree, because Spain has not passed its NIS2 law.

Key laws

  • Código Penal (Organic Law 10/1995):
    • Art. 197 bis: accessing all or part of an information system without authorisation by breaching its security measures, or staying in it against the owner’s will (six months to two years). The same article covers intercepting non-public data transmissions.
    • Art. 197 ter: producing, acquiring or supplying programs, passwords or access codes in order to commit those offences.
    • Art. 264: deleting, damaging, altering or suppressing another person’s data or programs without authorisation, where the result is serious.
    • Art. 264 bis: seriously obstructing or interrupting the operation of another person’s information system, which covers denial-of-service attacks. Art. 264 ter covers the tools used to do so.
    • Art. 249: computer fraud, meaning manipulating an information system or using stolen card or payment data to obtain unauthorised transfers. It was reorganised by Organic Law 14/2022, in force since 23 December 2022.
  • Organic Law 3/2018 on the Protection of Personal Data and Guarantee of Digital Rights (LOPDGDD) together with the EU GDPR.
  • Royal Decree-Law 12/2018 on the security of networks and information systems: Spain’s NIS1 law, still in force. The bill transposing NIS2, the draft Ley de Coordinación y Gobernanza de la Ciberseguridad, was approved by the government in January 2025 but has stalled in Congress. In July 2026 the European Commission referred Spain to the EU Court of Justice over the delay.

Spain is a party to the Budapest Convention on Cybercrime (ETS 185), which entered into force for it on 1 October 2010.

Enforcement

The Policía Nacional (through its central cybercrime unit) and the Guardia Civil (through its telematic crimes group) investigate cybercrime, and the Public Prosecutor’s Office has a specialised prosecutor for computer crime. INCIBE runs the national CERT for citizens and businesses, CCN-CERT handles the public sector, and the Agencia Española de Protección de Datos (AEPD) enforces data-protection law.


Plain-language overview, not legal advice. Statutes change. Read the current consolidated text on the BOE and seek qualified advice for any specific matter.

Sources checked 13 November 2026 against the consolidated texts on the BOE and published Spanish commentary on the 2022 fraud reform and the NIS2 bill.