Articles

Liability for Errors Resulting from Artificial Intelligence
Author : Dr. Mufti Sa`eid Farhan
Date Added : 03-12-2025

Liability for Errors Resulting from Artificial Intelligence

 

All praise is due to Allah, the Lord of all worlds. May peace and blessings be upon our Master Muhammad, and upon his family and companions.

Recently, the discussion surrounding Artificial Intelligence (AI) has intensified. AI is a product of humanity's technological advancement, a progress accelerating at a pace that humanity itself can barely comprehend. It is self-evident that AI has penetrated every field, even matters of religion and fatwā (Shariah rulings), as reliance on AI is increasing gradually. AI now offers services to people, educating them, issuing fatāwā for them, and sometimes even treating them medically.

The definitions of Artificial Intelligence have varied, but they share a common thread of discussing problem-solving or finding solutions through a machine. One of the best statements clarifying this is Philip J. Janssen's definition of AI: "It is the science and engineering of machines with capabilities considered intelligent according to human intelligence standards."[1]

Here, a critical question arises: What if the use of AI in any of its application fields results in an error, a defect, or even a felony? What are the consequences, and who bears the liability (taba'iyyah)?

Undoubtedly, reliance on AI is a good thing with obvious benefits. But has AI been fully understood and all its aspects comprehended? If a human makes a mistake, they can be held responsible for the consequence of their error, whether the error was purely accidental or involved negligence or dereliction of duty. Each error has a corresponding penalty, which is clear and unequivocal. However, ambiguity arises when the error originates from multiple sources; that is, the error resulted from interconnected actions. This is similar to what jurists refer to as the meeting of the Indirect Cause (Mutasabbib) and the Direct Perpetrator (Mubāshir), such as when one person ties up another, and a third person comes and kills him. This case has its settled jurisprudential rulings in the four schools of thought (Madhāhib).

However, what is the situation if a similar act arises from the use of AI? For example, a company programs a self-driving car, and this autonomous driving results in an accident leading to a human death. In this case, the direct perpetrator is a machine, but not a machine in the previously known sense; rather, it is a machine manufactured in a way that simulates the human method of decision-making. Who bears the liability for this error, and the resultant guarantee (ḍamān) or punishment ('uqūbah)?

Examples of AI Errors:

Concern over this issue has arisen due to the increasing number of errors resulting from the comprehensive use of AI. Some of these machine-induced errors have reached the extent of taking a life.

For instance, an error could be produced by a robot, resulting in the killing or causing bodily harm to a person. The harm might also be purely financial. There have been numerous errors resulting from reliance on AI, of which we mention a few:

First: The U.S. National Highway Traffic Safety Administration (NHTSA) recorded over 392 accidents linked to self-driving systems in cars (like Tesla, Honda, etc.), resulting in six direct fatalities [2]. Who is responsible for these deaths, and upon whom is the blood money (Diyyah) and expiation (Kaffārah) due?

Second: A study conducted in several medical centers in Poland found that doctors failed to detect signs of cancer when using AI techniques, according to the tech website TechSpot. These centers were participating in a trial program using AI in colonoscopy for potential cancer prevention. This prompted researchers to study whether AI affects surgeons' skills. The team analyzed over 1442 procedures performed by highly experienced doctors, each having performed over 2000 colonoscopies. The success rate in detecting colon cancer was measured for 3 months before using AI tools and for another 3 months after using AI techniques. The study found a 6% decrease in the success rate of detecting colon cancer among doctors who used AI for 3 months compared to the period when they did not use AI techniques [3].

In a study by The Lancet Digital Health Institute, AI algorithms for diagnosing skin cancer gave erroneous results in 11-15% of cases compared to specialist doctors.[4]

Jurisprudential Efforts in This Field:

Although the discussion of liability for errors resulting from AI is new to the jurisprudential arena, literature on the subject has proliferated. Most of this literature consists of Shariah or legal research published in peer-reviewed journals. This is likely due to the primary importance of the topic, the necessity of clarifying its Shariah ruling as a novel issue, and the ambiguity that may surround it, given AI's continuous and astonishing development.

There have been attempts to clarify the Shariah ruling or legal opinion on the consequences of AI errors. For example, a published research paper by Dr. Najlaa Ibrāhīm[5] clarified the ruling on killing caused by a robot or resulting from a car accident in various scenarios, sometimes reaching the penalty of retaliation (Qaṣāṣ). However, this is not against the machine, but against the controller, if he was in control of the machine, which is then treated as a knife in the hand of the killer.

Furthermore, the book [Criminal Liability for AI Damages] by Muhammad Ali Abū 'Alī analyzed and studied the criminal liability of AI for its criminal acts and the possibility of establishing the elements of criminal liability for the harms and criminal acts committed by AI.

The difficulty here is that the robot or machine is not a mere tool in the conventional sense; rather, it is an independent entity manufactured in a way that gives it the ability to make certain decisions. In this case, criminal liability may fall on the machine's controller or the programmer, or it may not, depending on the details and circumstances of the incident.

Islamic jurisprudence is capable of resolving all these ambiguities related to errors or crimes committed by the machine, classifying them in light of Shariah, and issuing rulings. Since the early eras of Islamic law in the second century AH, jurists have discussed similar issues concerning the machine in the chapter on the combination of the Direct Perpetrator and the Indirect Cause (Ijtima' al-Mubāshir wa al-Mutasabbib). Examples include: If one person throws another from a height, and a second person intercepts him with a sword and cuts him in two [6], the liability lies with the one who intercepted with the sword. If one throws him into drowning water, and a whale intercepts and swallows him, the liability lies with the one who threw him, because the whale is not subject to liability [7]. The machine can be analogized to the whale in the previous example due to the common factor of lack of legal competence and capacity ('adam at-taklīf wa 'adam al-ahliyyah).

There is also recourse for such issues in the jurisprudential maxim: "The injury caused by an unintelligent being is void" (Jināyat al-'Ajmā' Jubār). This means that the harm caused by an animal to life or property is void (i.e., not liable) if it does not originate from the action of a willing perpetrator (such as a driver, leader, rider, striker, stabber, or one who causes fright) [8].

Legal Efforts in This Field:

The interest of the Shariah scholars in the laws regulating liability for damages resulting from AI is no less than that of the legal scholars. This is due to the necessity of reaching a legal classification (takyīf) for AI, upon which the consequences of any error resulting from AI use, such as the necessity of compensation and the resulting punishment, are built.

Many books and research papers have been published urging the determination of the legal classification of AI and the effect of errors resulting from its use, and the issuance of legal legislation to regulate all of this. Examples include: a research paper by Dr. Ben 'Awdah Ḥaskar Murād titled: [The Problematic Application of Criminal Liability Rulings to AI Crimes], which clarified the complexities and ambiguity in applying the provisions of the Penal Code to AI crimes due to the perceived difficulty in identifying the actual perpetrator.

In a research paper titled [Criminal Liability for AI Errors], published in the Zaytoona University Journal in 2024, the researcher Ḥanān Khiḍr al-Ḥasanāt discussed the legal deficiency in regulating the foundations of criminal liability arising from AI errors.

While imposing punishment for harmful acts resulting from AI is somewhat ambiguous and requires more legislation, the necessity of compensation (ḍamān) is clear and unproblematic. Article (265) of the Jordanian Civil Code stipulates: "Every harm done to another obligates the perpetrator, even if he lacks discernment, to compensate for the damage." Based on this, if any harm occurs from an autonomous entity or the like, the liability falls upon the operator or the programmer, and the machine is considered a mere tool.

An example from practical reality in a foreign country: a customer asked an airline's intelligent chatbot about discounts on flight tickets. The chatbot mistakenly assured him he was eligible for a discount, and based on that, he bought the tickets. However, the company's policy did not include any actual discount at that time. When the customer did not receive the promised refund, he filed a lawsuit against the airline. The court ruled in his favor, ordering the company to adhere to the non-existent policy and pay compensation. The company's argument that "the chatbot was responsible for its own actions" was definitively rejected. Instead, the case established that companies bear responsibility for their AI agents.[9]

In conclusion, it has become essential to exert scholarly effort (Ijtihād) regarding the rulings on errors resulting from the use of AI, and to establish legal legislation emanating from both jurisprudential and legal scholarly efforts to resolve disputes and eliminate disagreements on this matter. In addition to its necessity, it is a highly difficult issue because it is a blend of jurisprudence, law, technology, and humanity.

Furthermore, the resulting errors vary significantly in degree: there is the slight error and the gross error, with many stages in between. There are financial errors related to property and criminal errors resulting in death. The latter is the most serious, and it is illogical for there to be no laws and foundations regulating all this, leaving the matter to judicial discretion that may differ from one perspective to another.

References

[1] Mark Coeckelbergh, AI Ethics, translated by Heba Abdel-Aziz Ghanem.

[2] National Highway Traffic Safety Administration (NHTSA), available at: https://www.nhtsa.gov/

[3] Al Jazeera Net — “Study: Doctors Fail to Diagnose Cancer,” available at: https://www.aljazeera.net/tech/2025/8/16/...

[4] The Lancet Digital Health, available at: https://www.thelancet.com/journals/landig/home

[5] Dr. Najla Ibrahim Barakat, Head of the Department of Comparative Fiqh, Faculty of Women, Assiut University.

[6] Explanation of the statement: “If a person throws another from a high place, and during his fall he lands on the sword of a third person, resulting in his death.”

[7] Mukhtasar al-Taḥrīr with the commentary Sharḥ al-Kawkab al-Munīr by Ibn al-Najjār al-Ḥanbalī, vol. 1, p. 448.

[8] Ahmad al-Zarqā’, Sharḥ al-Qawā‘id al-Fiqhiyyah, p. 457.

[9] Digital Defynd — “Top AI Disasters,” available at: https://digitaldefynd.com/IQ/top-ai-disasters/

Article Number [ Previous | Next ]

Read for Author




Comments


Captcha


Warning: this window is not dedicated to receive religious questions, but to comment on topics published for the benefit of the site administrators—and not for publication. We are pleased to receive religious questions in the section "Send Your Question". So we apologize to readers for not answering any questions through this window of "Comments" for the sake of work organization. Thank you.




Summarized Fatawaa

What is the ruling of Islamic Law on kissing while fasting?

All praise is due to Allah, and peace and blessings be upon our master the Messenger of Allah ﷺ.
It is prohibitively disliked (makrūh taḥrīman) for a husband to engage in foreplay with or kiss his wife during the daylight hours of Ramaḍān if doing so stirs his desire. If pre-seminal fluid (madhī) is released as a result, the fast is not invalidated; however, if seminal fluid (manī) is released, the fast is broken.
Imām al-Khaṭīb al-Sharbīnī, may Allah have mercy upon him, stated: "It is prohibitively disliked to kiss — whether on the mouth or elsewhere — for one whose desire is stirred, whether man or woman, to the extent that he fears it may lead to intercourse or ejaculation. Embracing, touching, and similar acts without a barrier carry the same ruling as kissing in this regard, because such acts expose the act of worship to being corrupted — and as the two Ṣaḥīḥs record: 'Whoever circles around a protected boundary is liable to fall into it.'"
He further added: "It is preferable for one whose desire is not stirred — even if he is a young man — to refrain from such acts as well, so as to close the door entirely. For he may believe his desire has not been aroused when in fact it has. Moreover, it is Sunnah for the fasting person to abstain from all desires without exception." — Summarised with minor adaptation from [Mughnī al-Muḥtāj]. And Allah the Almighty knows best.

What is the ruling of Islamic Law on someone who wakes up in a state of janābah (major ritual impurity) near the very end of the prayer's designated time, during cold weather — should he heat water in order to perform ghusl, even though the prayer's time will expire as a result, or should he perform tayammum instead?

All praise is due to Allah, and peace and blessings be upon our master, the Messenger of Allah ﷺ.
If the water is cold, and cannot be used due to fear of harm that is not ordinarily tolerable, or that would result in illness, then in this case it becomes obligatory to heat the water — even if heating it causes the time for Fajr to expire — and no sin is incurred in doing so, due to his valid excuse. He may not resort to tayammum (dry ablution) instead, since water remains available [and merely needs to be heated].
Imam Shihāb ad-Dīn Aḥmad ar-Ramlī (raḥimahullāh) said: "He was asked regarding a person who, if he were to use cold water, would experience harm that permits tayammum, and who has access to something with which he could heat the water — but if he heats it, the prayer's time will expire. Is it obligatory for him to heat it even if the time expires, or should he pray with tayammum within the prescribed time? He answered that it is obligatory for him to heat the water, even if the time for that particular obligatory prayer expires." [Fatāwā ar-Ramlī, Vol.1/P.98]
Imam al-Bājūrī (raḥimahullāh) said in his Ḥāshiyah on Sharḥ Ibn Qāsim (Vol.1/P.173): "And if he fears [harm] from using cold water, and is currently unable to heat it, but knows of a place where firewood is available, such that if he were to go there he would not return until after the prescribed time has expired — what appears [to be the correct position] is that it is obligatory for him to go and seek the firewood, even if the time expires as a result, as this is the position ultimately settled upon by ar-Ramlī, and as related from him by Ibn Qāsim." And Allah, the Exalted, knows best.

A man insulted the Divine Essence; is it obligatory for him to perform Ghusl?

 
Praise be to Allah, and peace and blessings be upon our Master, the Messenger of Allah.
 
Insulting or blaspheming the Divine Essence (Dhat al-Ilahiyyah) constitutes apostasy (Riddah). The perpetrator of this grave sin must immediately repeat the two testimonies of faith (Shahadah) and sincerely repent to Allah the Exalted. It is recommended (Sunnah) for them to perform a ritual bath (Ghusl), though it is not a mandatory condition [for the validity of their return to Islam]. And Allah the Exalted knows best.

If a person enters a mosque and finds the congregation in the final tashahhud, which is more virtuous — joining them or waiting for a second congregation to catch the opening takbīr (takbīrat al-iḥrām)?

All praise is due to Allah, and peace and blessings be upon our master the Messenger of Allah ﷺ.
If a worshipper finds a congregation that is about to finish its prayer, and he hopes to catch the entire prayer from the beginning with another congregation, it is more virtuous for him to pray with this first congregation and then repeat the prayer with the second one — provided he does not intend to confine himself to a single prayer. If, however, he intends to perform only one prayer, then it is more virtuous for him to wait for the second congregation rather than joining the first, so that he may attain the reward of congregational prayer for every single rakʿah.
Al-Khaṭīb al-Sharbīnī, may Allah have mercy upon him, states: "If members of a congregation enter the mosque while the imam is in the final tashahhud, al-Qāḍī Ḥusayn held that it is recommended for them to join him in prayer, and that they should not delay in order to form a second congregation. Al-Mutawallī, however, affirmed the opposite view, and al-Qāḍī's own statement elsewhere supports this latter position, which is the relied-upon view. In fact, it is more virtuous for a person who has missed part of the prayer with one congregation, and who hopes to catch another congregation with whom he can attain the entire prayer within its proper time, to delay so that he may catch it in full with them. This applies when he intends to confine himself to a single prayer; otherwise, it is more virtuous for him to pray with the first group and then repeat the prayer with the others." [Mughnī al-Muḥtāj,Vol. 3/P.186] And Allah the Almighty knows best.