A hadith depicts Muhammad saying: “Whoever changed his Islamic religion, then kill him” (Bukhari 9.84.57). The death penalty for apostasy is part of Islamic law according to all the schools of Islamic jurisprudence.
This is still the position of all the schools of Islamic jurisprudence, both Sunni and Shi’ite. Sheikh Yusuf al-Qaradawi, the most renowned and prominent Muslim cleric in the world, has stated: “The Muslim jurists are unanimous that apostates must be punished, yet they differ as to determining the kind of punishment to be inflicted upon them. The majority of them, including the four main schools of jurisprudence (Hanafi, Maliki, Shafi’i, and Hanbali) as well as the other four schools of jurisprudence (the four Shiite schools of Az-Zaidiyyah, Al-Ithna-‘ashriyyah, Al-Ja’fariyyah, and Az-Zaheriyyah) agree that apostates must be executed.”