Cybercrimes in Spain: what they are, types, and regulations in the Penal Code
The digital revolution has transformed every aspect of modern society, from communication and commerce to education and entertainment.
However, this technological advance has also opened the door to new forms of crime: computer crimes or cybercrimes.
These illicit activities, committed through information and communication technologies (ICT), represent a growing threat to individuals, businesses and governments.
This article offers a comprehensive analysis of cybercrimes, highlighting their regulation in the Spanish Penal Code , European regulations and the most relevant international agreements.
In addition, it examines international cooperation in the fight against cybercrime and provides practical advice on how to prevent and protect against such crimes.
What are computer crimes?
Cybercrimes are illegal acts committed using ICTs as a means or end. In the context of cybersecurity in Spain , these criminal activities affect individuals, companies, and public bodies. These acts can include :
- Attacks on computer systems: hacking, malware distribution, DDoS attacks.
- Electronic frauds: phishing, carding, pharming.
- Impersonation: online identity theft to commit fraud or defame.
- Crimes against privacy: unauthorized access and dissemination of personal data.
- Crimes against intellectual property: piracy of software, music, movies.
The complexity of these crimes lies in their ability to transcend borders, which poses challenges in terms of jurisdiction, legislation and international cooperation.
Furthermore, rapid technological evolution demands constant updating of legal regulations to effectively combat these cybersecurity threats and protect citizens against computer fraud.
Computer crimes in the Spanish Penal Code
The Penal Code has been subject to various legislative reforms to adapt to the evolution of computer crimes in Spain and to guarantee an effective response to these new forms of cybercrime.
The reforms of 2010 (Organic Law 5/2010) and 2015 (Organic Law 1/2015) introduced and updated specific articles to address these criminal behaviors.
The treatment of computer crime in the Spanish Penal Code covers everything from attacks on systems to electronic fraud, establishing sanctions proportionate to the seriousness of the acts.
Below is a detailed analysis of the main types of cybercrime contemplated in Spanish criminal law:
1. Illegal access to computer systems (Art. 197 bis)
One of the main cybercrimes in Spain is unauthorized access to information systems, defined in Article 197 bis of the Spanish Penal Code . Article 197 bis penalizes unauthorized access to protected computer systems, violating established security measures, or facilitating such access to third parties.
- Criminal conduct sanctioned:
- Unauthorized access to all or part of an information system.
- Remain in an information system without the consent of the owner.
- Intercept unauthorized computer data transmissions.
- Feathers expected:
- Prison from 6 months to 2 years.
- Interception of data: Imprisonment from 3 months to 2 years or a fine of 3 to 12 months.
Related articles:
- Illegal access through the production or facilitation of programs I Passwords to commit the above crimes (Art. 197 ter CP).
2. Production and distribution of malicious software (Art. 197 ter)
Article 197 ter penalizes the creation, acquisition, distribution or use of computer programs or passwords intended to commit crimes related to the unlawful access to systems or the interception of data.
- Criminal conduct:
- Creation or distribution of software designed to violate the security of computer systems.
- Providing unauthorized passwords or access codes to facilitate the commission of computer crimes.
- Feathers:
- Imprisonment from 6 months to 2 years or a fine of 3 to 18 months.
Related articles:
- La interception of computer data through artifice or technical means (Art. 197 bis 2 CP).
- La permanence or facilitation of access to a computer system violating the security measures of this and against the will of its legitimate user (197 to 1 CP).
3. Discovery and revelation of secrets (Art 197)
Article 197 penalizes the appropriation, modification and dissemination of reserved data without consent, violating personal or family privacy.
- Criminal conduct:
- Appropriating emails, documents or private data without authorization.
- Disseminate personal or family data without authorization.
- Feathers:
- Imprisonment from 1 to 4 years and a fine of 12 to 24 months.
- If the data is sensitive or the victim is a minor, the penalty is imposed in the upper half.
Related articles:
- La revelation of the secret in question (Art. 278.2 CP).
- La dissemination, revelation or transfer of the secret performed by whoever has legal or contractual obligation to keep it (Art. 279 CP).
4. Computer fraud (Art 248)
Article 248 regulates the crime of fraud through the manipulation of computer systems to obtain an illicit economic benefit.
The schemes include unauthorized transfer of assets and fraudulent use of credit cards.
- Criminal conduct:
- Manipulation of computer systems to carry out non-consensual transfers.
- Creation or use of computer programs intended to commit fraud.
- Fraudulent use of credit or debit cards.
- Feathers:
- Prison sentence of 6 months to 3 years.
- Penalties may be increased depending on the economic damage caused or if the crime is committed within the framework of a criminal organization.
5. Damage to computer systems (Art 264)
Article 264 penalizes the destruction, alteration or deletion of data, computer programs or electronic documents belonging to others without authorization, when the damage is serious.
- Criminal conduct:
- Delete, damage, deteriorate, alter or make inaccessible data or computer programs.
- Destroy or alter foreign information systems.
- Feathers:
- Prison sentence of 6 months to 3 years.
- If the damage is particularly serious or affects critical infrastructure, the penalty can be increased to up to 5 years in prison.
Related articles:
- Obstruction or interruption of the operation of a computer system, (Art. 264 bis CP).
- Production, acquisition or facilitation of programs (Art. 264 ter CP).
- Providing passwords intended to commit any of the above crimes (Art. 400 CP).
6. Obstruction of computer systems (Art. 264 bis)
Article 264 bis punishes the obstruction or interruption of the operation of a computer system by means of the introduction of unauthorized data or alterations.
- Criminal conduct:
- Entering data or transmitting information to disrupt or block a computer system.
- Destroy, damage or render useless another's information system.
- Feathers:
- Prison sentence of 6 months to 3 years.
- If the crime affects critical infrastructure or seriously harms a company or public administration, the penalties may be more severe, up to 8 years in prison.
Related articles:
- Erase, damage, deteriorate, alter, suppress or make inaccessible computer data (Art. 264 CP).
- Production, acquisition or facilitation of programs (Art. 264 ter CP).
- Providing passwords intended to commit any of the above crimes (Art. 400 CP).
7. Falsification of computer documents (Art 401)
Article 401 penalizes the falsification of civil status , which in the digital context translates into identity theft through the use of falsified documents or credentials.
- Criminal conduct:
- Falsifying identities on documents or digital credentials.
- Using false documents to carry out transactions or commit fraud.
- Feathers:
- Prison sentence of 6 months to 3 years.
Related articles:
- Counterfeiting of currency and stamps (Arts. 386 a 389 CP class).
- Forgery of public, official and commercial documents (Arts. 390 a 394 CP class).
- Forgery of private document (Arts. 395 a 396 CP class).
- Certificate forgery (Arts. 397 a 399 CP class).
- Counterfeiting credit cards, debit cards or traveler's checks (Art. 399 bis CP).
- Manufacturing, receiving, obtaining or holding instruments, data or computer programs intended for the commission of the types mentioned (Art. 400 CP).
There are more cybercrimes regulated in the Spanish Penal Code that have not been mentioned in this article.
These include conduct such as falsifying electronic documents, manipulating computer devices or distributing malicious software, among others.
For a more complete and detailed view of all the defined cybercrimes, it is recommended to consult the Spanish Penal Code directly or to go to a professional specializing in criminal law.
European legislation on cybercrime
La European Union has developed a comprehensive regulatory framework to combat Cybercrime, improve the ciberseguridad and protect the fundamental rights of its citizens in the digital environment.
These measures seek to harmonize national legislation, including that of Spain, in the face of the growth of Cybercrime and threats like the computer fraud.
Below are the main European directives, regulations, and agreements relevant to the fight against cybercrime.
Directive 2013/40/EU on attacks against information systems
Objective : To establish measures to combat attacks on information systems and to harmonize the legislation of the Member States in this matter.
- Content: It establishes the classification of computer crimes, promotes cooperation between Member States and sets minimum penalties for crimes such as hacking and the distribution of malware.
- Impact in Spain: Adaptation of the Criminal Code to comply with the requirements of the directive, strengthening legislation against cybercrime.
General Data Protection Regulation (GDPR) 2016/679
Objective : To protect personal data and guarantee the rights of individuals over their information in the digital age.
- Content: Regulates the processing of personal data, establishing severe sanctions for unauthorized use.
- Sanctions: Fines of up to 20 millones de euros or 4% of annual turnover.
- Impact in Spain: It is complemented by the Organic Law 3 / 2018 Personal Data Protection and Guarantee of Digital Rights, which reinforces national regulations on data protection.
NIS 2 Directive (Directive (EU) 2022/2555 on measures for a high common level of cybersecurity)
Objective : To strengthen cybersecurity in the European Union by expanding the scope and tightening security obligations for public and private entities.
It replaces Directive 2016/1148 (NIS 1) to adapt to the increase and sophistication of computer crimes and cyber threats.
Content :
- It expands the scope of application to more sectors, including essential services and medium-sized businesses in sectors such as health, energy, transportation, public administration or digital services.
- It obliges the affected entities to:
- Evaluate risks and apply technical and organizational measures ciberseguridad.
- Report serious incidents within short and specific timeframes.
- Cooperate with national and European authorities in incident prevention and response.
eIDAS Regulation (Regulation 910/2014 on Electronic Identification and Trust Services)
Objective : To guarantee the security and legal validity of electronic transactions in the EU through the use of electronic signatures and digital certificates.
- Content: Regulates the use of electronic identities y electronic stamps to ensure security in digital transactions.
- Social Impact: Strengthens the fight against fraud digital and identity theft.
International cooperation in the fight against cybercrime
Given the global nature of cybercrime, international cooperation is essential.
The Budapest Convention on Cybercrime is the main international treaty in this area, ratified by more than 80 countries, including Spain.
Budapest Convention on Cybercrime
Objective : To establish a common criminal policy to protect society against cybercrime through appropriate legislation and improved international cooperation.
- Content: Defines computer crimes and establishes procedures for investigation and international cooperation in the prosecution of these crimes.
- Impact in Spain: Spain has harmonised its legislation and actively participates in international cooperation against cybercrime.
Prevention and tips to protect yourself against cybercrime
Prevention is the best strategy to minimize the risk and impact of cybercrime.
Here are some practical recommendations:
- Strong passwords: Use robust combinations of letters, numbers and symbols.
- Regular updates: Keep systems and programs up to date.
- Caution with links and files: Avoid opening suspicious links or files.
- security software: Install antivirus and firewall.
- Backups: Perform periodic backups of data.
- Cybersecurity education: Stay informed about the latest threats.
- Using Secure Networks: Use VPN networks on public connections.
- Mobile device protection: Secure devices with passwords and security software.
Conclusion
The fight against cybercrime requires constant updating of regulations and close international cooperation.
The Spanish Penal Code, together with European regulations and international agreements, offers a robust framework for sanctioning such conduct.
Furthermore, prevention and awareness are fundamental to mitigating the risks posed by cybercrime.
Adopting appropriate security measures is essential for both individuals and companies, in an increasingly digitalized and vulnerable environment.
This article provides a comprehensive overview of the most important regulations and agreements, offering useful tools to understand and address the challenges of cybersecurity in the 21st century.

RRYP Global, expert criminal lawyers.

