The debate over whether companies can legally use artificial intelligence (AI) as a reason to replace workers with automation has taken a significant step forward. A recent ruling by the Social Chamber of the Superior Court of Justice of Madrid (TSJM) has addressed this very question, leaving the door open for AI to justify layoffs under certain conditions. This case, involving a video game development studio, is the first in Spain to tackle AI as a grounds for dismissal, and its implications are far-reaching.
The Case That Sparked the Debate
The ruling, case number 864/2026 dated October 8, resolves an appeal filed by a scriptwriter who argued that her dismissal within a collective redundancy procedure (ERE) should be declared null and void. A lower court had previously declared the dismissal unfair and called for nullity and moral damages. Importantly, her dismissal letter did not mention AI as a reason.
In contrast, a 3D graphics modeler from the same studio, also affected by the ERE, received a dismissal letter that did cite AI. The lower court had already declared her dismissal fair. This discrepancy highlights the nuanced approach courts are taking when AI is invoked as a justification for layoffs.

What the Court Actually Ruled
The TSJM's decision focused on whether the scriptwriter's dismissal should be nullified. The court examined the use of AI as a justification for the ERE but did not outright reject it. Instead, it left many doors open, suggesting that AI could be a valid cause if properly documented and applied. The ruling underscores that each case will be assessed on its individual merits, particularly whether AI was genuinely the driving factor behind the redundancy.
This means that companies cannot simply cite AI as a blanket excuse for layoffs. They must demonstrate that the implementation of AI directly led to the elimination of specific roles and that the procedure followed legal requirements.
Key Takeaways for Employers and Employees
- AI can be a valid cause for layoffs if it is clearly linked to the eliminated positions and properly documented in dismissal letters.
- Inconsistency in dismissal letters matters: if some letters cite AI and others do not, courts may scrutinize the fairness of each case separately.
- Employees can challenge dismissals if they believe AI was not the real reason or if procedures were flawed.
- Legal uncertainty remains: this ruling is a first step, and future cases will shape how AI is treated in labor law.
- Companies should consult legal experts before using AI as a justification for redundancies to ensure compliance.
Why This Ruling Matters
As AI adoption accelerates across industries, from manufacturing to creative sectors like video game development, the question of job displacement becomes more pressing. This ruling provides a legal precedent that AI can be a legitimate reason for restructuring, but it also emphasizes the need for transparency and consistency. It signals that courts will not automatically accept AI as a justification but will examine the specific circumstances.
For workers, the ruling means that they can still challenge dismissals if they believe AI is being used as a pretext. For employers, it highlights the importance of clearly articulating the role of AI in redundancy plans and ensuring that all affected employees are treated consistently.
How AI Is Changing the Legal Landscape
The integration of AI into business operations is not just a technological shift but also a legal one. Labor laws, often written before the AI era, are now being tested. This Madrid case is among the first to interpret existing regulations in light of AI-driven changes. It sets a benchmark for how courts might handle similar cases in the future, balancing business innovation with worker protection.
Legal experts suggest that companies should document the implementation of AI and its impact on job roles meticulously. They also advise that dismissal letters should explicitly state AI as a cause if that is the case, to avoid claims of unfairness.
Practical Implications for Businesses
Businesses considering AI-driven restructuring should be aware that the burden of proof lies with them. They must show that the decision was based on genuine economic, technical, or organizational reasons linked to AI. This includes providing evidence of how AI replaces specific tasks and why that leads to redundancies.
Moreover, consistency is key. If AI is cited for some employees but not others in the same restructuring, it could raise red flags. Companies should ensure that all dismissal letters reflect the true reasons and that the process is transparent. The background to this story is set out in Meta AI Layoff Lawsuit: Workers Claim Bias in Mass Cuts. A related thread runs through Meta AI Layoff Lawsuit: Workers Claim Bias in Termination Tools. Earlier coverage in Google Workers Demand Layoff Protections Amid AI Boom shows how the argument developed.
What to Watch Next
As AI continues to evolve, more legal challenges are likely. This ruling is just the beginning. Future cases may address issues such as whether AI implementation constitutes a technological change that justifies collective dismissals, and how to balance efficiency gains with social responsibility. Workers and unions may push for stronger protections, while employers seek clarity on their rights. A closer look at the same subject appears in Google Workers Demand Layoff Protections Amid AI Boom in Petition. Anyone following the wider picture can start with Used-Car Boss Ousted in Orchestrated Plan, Judge Rules. The same theme surfaces in Used-Car Boss Ousted in Investor Coup, Judge Rules, which takes a different angle.
Staying informed about these developments is crucial for both sides. The Madrid ruling provides a foundation, but the law will continue to adapt. Context on how this played out before sits in Epic Games Layoffs Lead to AI-First Development for Disney Game. A companion piece, Woman Served Her Mother In Law Dog’s Water, Asks Reddit Whether She Was Right Or Wrong, approaches the same subject from another angle.
FAQ
Can AI be used as a reason for layoffs in Spain?
Yes, according to the Madrid Superior Court of Justice, AI can be a valid cause for layoffs if it is properly documented and directly linked to the eliminated positions. However, each case is assessed individually, and companies must follow legal procedures.
What was the outcome of the Madrid case?
The court ruled on the appeal of a scriptwriter whose dismissal did not mention AI, while a colleague's dismissal did cite AI and was declared fair. The ruling left many doors open, emphasizing that AI can justify layoffs under certain conditions.
How can employees challenge an AI-related dismissal?
Employees can challenge dismissals if they believe AI was not the genuine reason or if the procedure was flawed. They can argue that the dismissal was unfair or null, as in the case of the scriptwriter.
What should employers do to ensure compliance?
Employers should clearly document the role of AI in redundancies, ensure consistency in dismissal letters, and consult legal experts to navigate the evolving legal landscape.