Capital punishment in Islam was traditionally regulated by Sharia, the religious law in Islam that comes from the Hadith that lists the sayings and practices of Muhammad.[not specific enough to verify][not specific enough to verify] Crimes according to the Sharia laws which could result in capital punishment include murder, rape, adultery, etc. Though punishments don't often come directly from the Quran, the ideas of certain types of punishments in accordance to crimes committed, can be brought up such as how Islamic Scholar Numan Ali Khan in a short YouTube video says, "there are many passages where certain things are highlighted more than other". The reason why there are capital punishments in Islam is to regulate and make sure that humanity is still intact with society which is why the forms of punishments have evolved as time changed to adapt to the ways of living in this life where Islam is also evolving and growing. In the modern era most Muslim-majority countries adopted criminal legal codes based on European models which has also caused controversy around the World because it was deemed as inhumane as the UN says. Legal forms of capital punishment vary among Islamic countries.
The Quran states,
The punishment of those who wage war against Allah and His Messenger, and strive with might and main for mischief through the land is: execution, or crucifixion, or the cutting off of hands and feet from opposite sides, or exile from the land: that is their disgrace in this world, and a heavy punishment is theirs in the Hereafter, Except for those who return repenting before you apprehend them. And know that Allah is Forgiving and Merciful.
However, there are no Quranic verse that supports the method of stoning in Islam among humans as punishment, but it is presented as a metaphor in Surah 27, Ayat 58, "And We rained upon them a rain [of stones], and evil was the rain of those who were warned" translated by Sahih International which also warns Muslims about possible punishments for sinning/committing a crime. The roots of this method of execution are to be explored in pre-Islamic religions, especially in Judaism and Torah, in which stoning is a frequent method of execution. That said, capital punishment by stoning for zina (extramarital sex) is prescribed in Hadith, the books most trusted in Islam after Quran, particularly in Kitab Al-Hudud.
'Narrated Ash Shaibani: I asked 'Abdullah bin Abi Aufa, 'Did Allah's Apostle carry out the Rajam penalty (i.e., stoning to death)?' He said, "Yes." I said, "Before the revelation of Surat-ar-Nur or after it?" He replied, "I don't Know".
'Ubada b. as-Samit reported: Allah's Messenger as saying: Receive teaching from me, receive teaching from me. Allah has ordained a way for those women. When an unmarried male commits adultery with an unmarried female, they should receive one hundred lashes and banishment for one year. And in case of married male committing adultery with a married female, they shall receive one hundred lashes and be stoned to death.
Allah's Messenger awarded the punishment of stoning to death to the married adulterer and adulteress and, after him, we also awarded the punishment of stoning, I am afraid that with the lapse of time, the people may forget it and may say: We do not find the punishment of stoning in the Book of Allah, and thus go astray by abandoning this duty prescribed by Allah. Stoning is a duty laid down in Allah's Book for married men and women who commit adultery when proof is established, or if there is pregnancy, or a confession.
In the four primary schools of Sunni fiqh (Islamic jurisprudence) and the two primary schools of Shi'a fiqh, certain types of crimes mandate capital punishment. Certain hudud crimes, for example, are considered crimes against Allah and require capital punishment in public.[not specific enough to verify] These include apostasy (leaving Islam to become an atheist or convert to another religion), fasad (mischief in the land, or moral corruption against Allah, social disturbance and creating disorder within the Muslim state) and zina (consensual heterosexual or homosexual relations not allowed by Islam).
The right to be convinced and to convert from Islam to another religion is held by only a minority of Muslim scholars. This view of religious freedom is, however, not shared by the vast majority of Muslim scholars both past as well as present. Most classical and modern Muslim jurists regard apostasy (riddah), defined by them as an act of rejection of faith committed by a Muslim whose Islam had been affirmed without coercion, as a crime deserving the death penalty.
Qisas is another category of sentencing where sharia permits capital punishment, for intentional or unintentional murder. In the case of death, sharia gives the murder victim's nearest relative or Wali (ولي) a right to, if the court approves, take the life of the killer.
O ye who believe! the law of equality is prescribed to you in cases of murder: the free for the free, the slave for the slave, the woman for the woman. But if any remission is made by the brother of the slain, then grant any reasonable demand, and compensate him with handsome gratitude, this is a concession and a Mercy from your Lord. After this whoever exceeds the limits shall be in grave penalty.
Further, in case of Qisas-related capital punishment, sharia offers the victim's guardian the option of Diyya (monetary compensation). In several Islamic countries such as Sunni Saudi Arabia and Pakistan, as well as Shia Iran, both hudud and qisas type capital punishment is part of the legal system and in use. In others, there is a variation in the use of capital punishment.
Capital punishment for apostasy in Islam and stoning to death in Islam are controversial topics. Similarly, the discriminatory option between capital punishment and monetary compensation for crimes such as murder is controversial as well, where jurists have asked if poor offenders face trial and capital punishment while wealthy offenders avoid even a trial by paying off Qisas compensation.
Lethal stoning and beheading in public under sharia is controversial for being a cruel form of capital punishment.[page needed] These forms of execution remain part of the law enforced in Saudi Arabia, Yemen, Qatar, United Arab Emirates, Iran and Mauritania.[not specific enough to verify]