Skip to content
Legal Analysis

Criminal Liability of AI: Can an Algorithm Go to Jail?

December 14, 2025Updated: 

Key Takeaways

  • Legal vacuum in autonomous AI
  • Programmer's liability
  • User imputation
  • Criminal electronic personhood?

You cannot imprison an artificial intelligence. A crime requires a human act (actus reus) and a guilty mind (mens rea), and an AI lacks consciousness and will, so direct imputation to it is currently a dogmatic impossibility. Instead, liability is sought in a cascade of human culprits: the programmer or developer for gross negligence if the failure was foreseeable and avoidable; the manufacturer or company, as a legal entity, if it failed to implement a compliance model auditing the risks; and the user or owner if they did not supervise the system or ignored the warnings.

Need help with your case? Talk to a criminal defence lawyer at Alonso Sala.

Criminal law is based on voluntary human action. But what happens when the 'action' is performed by an autonomous artificial intelligence? If a driverless vehicle runs a red light and causes a fatal accident, if an algorithmic trading algorithm manipulates the market, or if an AI medical diagnostic system makes a fatal error, we face a legal vacuum: we cannot imprison a line of code.

The 'Actus Reus' Problem: The Absence of a Direct Human Author

The core of the problem is that a crime requires a human act (actus reus) and a guilty mind (mens rea). An AI, however advanced, lacks consciousness and will in the human sense. It does not 'decide' to commit a crime. It simply executes an incredibly complex code based on probabilities and training data. Therefore, direct imputation to the machine is, for now, a dogmatic impossibility in our legal system.

The Principle of Culpability

There is no punishment without intent or negligence. Attributing 'intent' to a neural network is a legal fiction that clashes head-on with the basic principles of liberal criminal law.

Cascading Liability: Finding the Human Behind the Code

Given the impossibility of blaming the AI, the prosecution seeks human culprits in a 'cascade of liability':

  • The Programmer/Developer: They can be charged with manslaughter or injury by gross negligence if it is proven that the accident was due to a foreseeable and avoidable programming error. The defence here is to prove that the code complied with the state of the art ('lex artis') and that the failure was an unpredictable 'edge case'.
  • The Manufacturer/Company: As a legal entity, it can be criminally liable if it did not implement a compliance model mapping the criminal risks of AI within the organisation.
  • The User/Owner: If the driver of the autonomous car did not supervise the system as required or ignored warnings, the negligence can be imputed to them, by omission of the duty of control.

Some theorists propose creating an 'electronic personhood' for the most advanced AIs, similar to that of commercial companies. This would not allow them to be imprisoned, but it would allow them to be sanctioned with adapted 'penalties': fines against their assets (if they had any), limitations on their capabilities, or even their definitive 'disconnection' (the 'digital death penalty'). However, this path poses enormous ethical dilemmas and is, for now, in the realm of legal science fiction.

Frequently asked questions

Can an artificial intelligence be criminally liable?

No. A crime requires a human act (actus reus) and a guilty mind (mens rea). An AI, however advanced, lacks consciousness and will in the human sense: it does not decide to commit a crime, it executes code based on probabilities and data. That is why its direct imputation is, for now, a dogmatic impossibility in our legal system.

If a self-driving car causes an accident, who is liable?

The prosecution looks for the human behind the code in a cascade of liability: the programmer or developer for gross negligence if the accident was due to a foreseeable and avoidable error; the manufacturer or company, as a legal entity, if it did not implement a compliance model auditing the risks; and the user or owner if they did not supervise the system as required or ignored the warnings.

How can an AI's programmer defend themselves?

By proving that the code complied with the state of the art (lex artis) and that the failure was an unpredictable edge case, not a foreseeable and avoidable error. That is the line of defence against a charge of gross negligence.

Is there talk of creating a legal personality for AI?

Some theorists propose an electronic personhood similar to that of commercial companies. It would not allow the AI to be imprisoned, but it would allow adapted sanctions such as fines against its assets, limitations on its capabilities, or its disconnection. For now this raises enormous ethical dilemmas and remains in the realm of legal science fiction.

Do you need criminal defence in this area?

We are criminal defence lawyers specialising in corporate ai criminal risk. We act urgently to protect your rights.

View expertise

This page is for information purposes only and does not constitute legal advice: every case requires individual assessment. How this content is produced and verified: editorial policy.

Related Articles

View all

Before you act, speak to a criminal defence lawyer.

What you read here is just the beginning. Transform information into active defence by contacting our team of experts.