Punishment for Apostasy in Islam
Question

I am happy to have found this website of yours. I was born a Muslim and I learned a lot of Islamic teachings after I reached adolescence. I am trying to understand my religion.
I have read in some of your answers on the issue of apostasy that the punishment for the apostate is to be put to death. But I have read on another website that the apostate who is to be put to death is the one who wages war on Islam (Muharib).
I am more inclined towards the second opinion.
The reason for that is that I have friends who were born in Muslim families and who have Muslim names, but some of them do not know how to do Wudu or how to pray, but they acknowledge the Shahadatayn.
Can we regard these people as apostates and thus put them to death?
Praise be to Allah.The Primacy of Quran and Sunnah in Islamic Rulings
The Muslim should not incline more towards one scholarly opinion rather than another just because it is in accordance with his whims and desires or his reasoning. Rather he has to accept the ruling based on evidence from the Quran and Sunnah. It is essential to put the texts and rulings of Shari`ah before all else.
What is apostasy?
Apostasy (Riddah) and going out of Islam are things that may be done in the heart, on the tongue or in one’s actions.
Forms of apostasy
Apostasy may take place in the heart, such as disbelieving in Allah, or believing that there is another creator alongside Allah, or hating Allah or His Messenger (peace and blessings of Allah be upon him).
Apostasy may take the form of words spoken on the tongue, such as defaming Allah or the Messenger of Allah (peace and blessings of Allah be upon him).
Or apostasy may take the form of outward physical actions, such as prostrating to an idol, mistreating the Mus-haf, or not praying.
The apostate (Murtadd) is worse than one who is a disbeliever in the first place.
Shaykh Al-Islam Ibn Taymiyah (may Allah have mercy on him) said, refuting the pantheistic belief of the Batinis:
It is well known that the disbelieving Tatars are better than these (Batinis), because the latter are apostates from Islam, of the worst type of apostates. The apostate is worse than one who is a disbeliever in the first place in many aspects. (End quote from Majmu` Al-Fatawa, 1/193)
Circumstances That Excuse a Muslim from Being Declared a Disbeliever
Not every Muslim who falls into disbelief is a disbeliever and apostate. There are reasons why a Muslim may be excused and not judged to be a disbeliever, for example: ignorance, misunderstanding, being forced, and making mistakes.

With regard to the first, a man may be ignorant of the ruling of Allah, because he lives far from the Muslim lands, such as one who grows up in the desert or in a disbeliever land, or has only recently come to Islam. This may include many of those Muslims who live in societies where ignorance prevails and knowledge is scarce. These are the ones concerning whom the questioner is confused as to whether they are to be judged as disbelievers and executed.
The second reason is if a person interprets the ruling of Allah in a manner not intended by the Lawgiver, such as those who blindly follow the people of Bid`ah (innovation) in their misinterpretations, such as the Murji’ah, Mu`tazilah, Khawarij and the like.
The third reason is if an oppressor overwhelms a Muslim and will not let him go until he makes a blatant statement of disbelief out loud in order to ward off the torture, when his heart is at ease with faith.
The fourth is when words of disbelief come to one’s lips without meaning it.

Not everyone who is ignorant about Wudu and prayer can be excused, when he sees the Muslims establishing prayer and praying regularly, and he can read and hear the verses on prayer. What is preventing him from praying or from asking about how it is done and what its essential conditions are?
Punishment for Apostasy in Islam
The apostate is not to be put to death immediately after he falls into apostasy, especially if his apostasy happens because of some doubt that arose. Rather he should be asked to repent and he should be offered the opportunity to return to Islam and resolve his doubts, if he has any doubts. Then if he persists in his apostasy after that, he is to be put to death.
Ibn Qudamah (may Allah have mercy on him) said in Al-Mughni (9/18):
The apostate should not be put to death until he has been asked to repent three times. This is the view of the majority of scholars, including `Umar, `Ali, `Ata’, An-Nakh`i, Malik, Ath-Thawri, Al-Awza`i, Is-haq and others. Because apostasy comes about because of doubt, and cannot be dispelled in an instant. Time should be allowed for the person to rethink the matter, and the best length of time is three days.End quote.
The authentic Sunnah indicates that it is essential to put the apostate to death.
Al-Bukhari (6922) narrated that Ibn `Abbas (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “Whoever changes his religion, put him to death.”
Al-Bukhari (6484) and Muslim (1676) narrated that `Abdullah ibn Mas`ud (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “It is not permissible to shed the blood of a Muslim who bears witness that there is no god except Allah and that I am the Messenger of Allah, except in one of three cases: a soul for a soul (i.e., in the case of murder); a previously-married person who commits adultery; and one who leaves his religion and separates from the main body of the Muslims.”
The general meaning of these Hadiths indicates that it is essential to put the apostate to death whether he is waging war on Islam (Muharib) or not.
The view that the apostate who is to be put to death is the one who is waging war on Islam (Muharib) only is contrary to these Hadith. The Prophet (peace and blessings of Allah be upon him) said that the reason why he should be put to death is his apostasy, not his waging war against Islam.
Verbal vs. Physical War Against Islam: Which Is More Harmful?
Undoubtedly, some kinds of apostasy are more abhorrent than others, and the apostasy of one who wages war against Islam is more abhorrent than that of anyone else. Hence some of the scholars differentiated between them, and said that it is not essential to ask the Muharib to repent or to accept his repentance; rather he should be put to death even if he repents, whereas the repentance of one who is not a Muharib should be accepted and he should not be put to death.
This is the view favoured by Shaykh Al-Islam Ibn Taymiyah (may Allah have mercy on him).
He said:
Apostasy is of two types: ordinary apostasy and extreme apostasy, for which execution is prescribed. In both cases there is evidence that it is essential to execute the apostate, but the evidence indicating that the sentence of death may be waived if the person repents does not apply to both types of apostasy. Rather the evidence indicates that that is allowed only in the first case – i.e., ordinary apostasy – as will be clear to anyone who studies the evidence that speaks about accepting the repentance of the apostate. In the second type – i.e., extreme apostasy – the obligation to put the apostate to death still stands, and there is no text or scholarly consensus to indicate that the death sentence may be waived. The two cases are quite different and there is no comparison between them. It does not say in the Quran or Sunnah, or according to scholarly consensus, that everyone who apostatizes in word or deed may be spared the death sentence if he repents after he is captured and tried. Rather the Quran and Sunnah, and scholarly consensus, differentiate between the different kinds of apostates. (End quote from As-Sarim Al-Maslul, 3/696)
Al-Hallaj was one of the most well-known heretics who were put to death without being asked to repent. Al-Qadi `Iyad (may Allah have mercy on him) said:
The Maliki jurists of Baghdad at the time of Al-Muqtadir unanimously agreed that Al-Hallaj should be killed and crucified because of his claim to divinity and his belief in incarnation, and his saying “I am Al-Haqq [God],” even though he outwardly appeared to adhere to Shari`ah, and they did not accept his repentance. (End quote from Ash-Shifa bi Ta`rif Huquq Al-Mustafa, 2/1091)
Based on this, it is clear that what the questioner says about the apostate not being killed unless he is waging war on Islam is mistaken, and the differentiation that we have quoted from Shaykh Al-Islam Ibn Taymiyah (may Allah have mercy on him) may dispel any confusion and make the matter clearer.
Waging war against Islam is not limited only to fighting with weapons, rather it may be done verbally such as defaming Islam or the Prophet (peace and blessings of Allah be upon him), or attacking the Quran, and so on. Waging verbal war against Islam may be worse than waging war against it with weapons in some cases.
Shaykh Al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
Muharabah (waging war against Islam) is of two types: physical and verbal. Waging war verbally against Islam may be worse than waging war physically – as stated above – hence the Prophet (peace and blessings of Allah be upon him) used to kill those who waged war against Islam verbally, whilst letting off some of those who waged war against Islam physically. This ruling is to be applied more strictly after the death of the Prophet (peace and blessings of Allah be upon him). Mischief may be caused by physical action or by words, but the damage caused by words is many times greater than that caused by physical action; and the goodness achieved by words in reforming may be many times greater than that achieved by physical action. It is proven that waging war against Allah and His Messenger (peace and blessings of Allah be upon him) verbally is worse and the efforts on earth to undermine religion by verbal means is more effective. (End quote from As-Sarim Al-Maslul, 3/735)
The Ruling on Not Praying: Is It Apostasy?
With regard to not praying, the correct view is that the one who does not pray is a disbeliever and an apostate. See question no. 5208.
And Allah knows best.