Sharia law recognizes marital infidelity and religious infidelity as crimes punishable by death, traditionally by stoning. The Qu'ran in its modern form does not stipulate punishment for these crimes, but Sharia law also recognizes the hadiths, the quotes of Muhammad, as an authority on this matter.
Marital infidelity is mentioned in Qur'an 24:2 as punishable by 100 lashes. However, there are several examples in the hadiths of Muhammad ordering adulterers and fornicators to be stoned to death. There is controversy among Islamic scholars as to which punishment is appropriate; some scholars only recognize the Qu'ran's commandment to flog, while others accept that stoning was ordered by Muhammad and has a precedent in similar punishments found in the Mosaic Law of the Bible. Sudan, Somalia and Iran have exacted such punishments.
Religious infidelity is described as apostasy by the Qu'ran. The Qu'ran defines an apostate as a person who has accepted the Muslim faith but later rejects or abandons the religion. The hadiths explain that an apostate is first given a short period of time to reconsider and potentially repent. If the apostate refuses, punishment is then enforced. If the apostate is male, he is sentenced to death immediately, while a female apostate is beaten and jailed for life.