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 on swearing an oath by the Prophet ﷺ, and does such an oath take effect according to Imām Aḥmad ibn Ḥanbal, requiring expiation upon its breach?

All praise is due to Allah, and peace and blessings be upon our master the Messenger of Allah ﷺ.
Swearing an oath by a created being is disliked (makrūh) in our Shāfiʿī school. Shaykh al-Islām Imām al-Nawawī, may Allah have mercy upon him, states: "Swearing by a created being is disliked — such as swearing by the Prophet, the Kaʿbah, Jibrīl, the Companions, or the Prophet's family. Al-Shāfiʿī, may Allah have mercy upon him, said: 'I fear that swearing by other than Allah the Almighty may constitute an act of disobedience.' The scholars of the school explained this to mean: that is, something forbidden and sinful — indicating that he had some hesitation in the matter. Al-Imām stated: the established position of the school is that it is categorically not forbidden, but rather disliked. Furthermore, whoever swears by a created being, his oath does not take effect and no expiation (kaffārah) is required if he breaks it." [Rawḍat al-Ṭālibīn wa ʿUmdat al-Muftīn, Vol. 11/P.6]
According to the Ḥanbalī school, however, expiation becomes obligatory upon one who swears by our master the Prophet ﷺ and then breaks his oath. Imām al-Bahūtī al-Ḥanbalī, may Allah have mercy upon him, states: "No expiation is required for swearing by other than Allah the Almighty, even if the oath is broken — because expiation was made obligatory for swearing by Allah and His attributes, out of reverence for His names, and nothing else is equal to Him in this regard... except in the case of swearing by our Prophet Muḥammad ﷺ, for expiation becomes obligatory when one swears by him and then breaks the oath. This was explicitly stated in the narration of Abū Ṭālib, because he is one of the two conditions of the two testimonies of faith by which a disbeliever becomes a Muslim. Ibn ʿAqīl held the view that swearing by any of the other prophets, peace and blessings be upon them all, carries the same ruling." [Sharḥ Muntahā al-Irādāt, Vol. 3/P.441]. And Allah the Almighty knows best.

What is the ruling of Islamic Law on a latecomer who joins the imam during the standing position of the first rakʿah but was unable to complete the recitation of al-Fātiḥah?

All praise is due to Allah, and peace and blessings be upon our master the Messenger of Allah ﷺ.
If a latecomer (masbuq) joins the prayer while the imam is standing, he should begin reciting Sūrat al-Fātiḥah immediately, without pausing to recite the opening supplication (duʿāʾ al-istiftāḥ) or the seeking of refuge (taʿawwudh). If the imam bows before he completes al-Fātiḥah, he follows the imam into the bow and leaves whatever remains of al-Fātiḥah — the imam bears it on his behalf.
It is stated in ʿUmdat al-Sālik (p. 47): "If a latecomer finds the imam standing and is confident that he has enough time to recite the taʿawwudh and al-Fātiḥah in full, he may do so. If he is uncertain, he should neither recite the opening supplication nor the taʿawwudh, but rather begin directly with al-Fātiḥah. If the imam bows before he completes it, he follows him into the bow — provided he had not already begun the opening supplication or the taʿawwudh. If he had begun either of them, he continues reciting al-Fātiḥah for as long as he spent on them." And Allah the Almighty 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.

What is the ruling on forgiving a tenant next month's rent, with the intention of counting it toward zakāh al-māl?

All praise is due to Allah, and peace and blessings be upon our master, the Messenger of Allah ﷺ.
It does not fulfill the obligation to count the rent owed on a house, or a portion of it, in lieu of zakāh. Rather, it is necessary to first transfer ownership of the zakāh amount to the poor person directly; only afterward may he be asked to pay the rent [from that money].
It is stated in ‘Umdat as-Sālik (p. 112): "If someone gives [money] to a poor person, stipulating that the recipient return it to him in payment of a debt owed to him, or says, 'I am making what you owe me into zakāh, so take it [as such]' — this is not valid. But if he gives it to him with the [unstated] intention that the recipient will use it to repay him, or says, 'Repay what you owe me, so that I may [then separately] give it to you as zakāh,' or the debtor himself says, 'Give it to me, so that I may [then] repay you with it' — this is valid, and there is no binding obligation for the recipient to actually fulfill this [informal understanding]."
We would also remind [the reader] of the ḥadīth of the Prophet ﷺ: "The Muslim is the brother of the Muslim: he does not wrong him, nor does he abandon him [to harm]. Whoever attends to the needs of his brother, Allah, the Mighty and Majestic, will attend to his needs. Whoever relieves a Muslim of a hardship, Allah, the Mighty and Majestic, will relieve him of one of the hardships of the Day of Resurrection. And whoever conceals [the faults of] a Muslim, Allah will conceal him on the Day of Resurrection." (Agreed upon). And Allah, the Exalted, knows best.