Although the religion of Islam calls upon all mankind to accept divine unity, it does not coerce them into accepting it because faith and belief cannot be based on force and compulsion. Indeed, this does not become a license to create an atmosphere of antagonism against Islam because Islam is based on monotheism and rejection of polytheism. According to Islam, one who has accepted Islam and grown up in a faithful Muslim family must remain adherent to it and if he denies one of the fundamentals of Islam and embarks openly on opposing it spreading sedition and disturbing public mind about right and wrong, he has committed a crime for which he must also undergo punishment.
An apostate is liable to punishment because of his social crime and sin not because of his personal belief. Hence, if a person becomes an apostate but he does not declare his apostasy to others, he will not be entitled to punishment. In other words, if such a person has put all his efforts into knowing the truth, he will be justified in his apostasy, so God, the Almighty, will not punish him as he is not really a criminal within the realm of the individual rules pertaining to him. However, if he has been guilty of knowing the truth, he is considered to be also a criminal within the realm of individual rules. In fact, apostasy is not an individual crime since the apostate not only violates the right of general public to maintaining their religious spirit but he also undermines the faithfulness of those who are not experts in the religion.
In the early period of Islam also, a number of the enemies of Islam conspired against it by first accepting Islam and then turning away from it so as to weaken Muslims' faith.
In order to prevent this threat, Islam prescribed capital punishment for apostasy, though it made also difficult to prove it so much so that only a limited number of people in the early period of Islam were sentenced to this punishment. Therefore, the psychological impact of this punishment rather than the punishment itself has brought about a healthy atmosphere for the general public. Obviously, the punishment of an apostate persuades non-Muslims to accept Islam with more caution, exactitude and precision, thus it will prevent from a shallow and shaky faith.
Although the religion of Islam calls upon all mankind to accept divine unity, it does not coerce them into accepting it because faith and belief cannot be forcefully imposed. Indeed, this does not become a license to create an atmosphere of opposition against Islam because Islam is based on monotheism and rejection of polytheism. According to Islam, one who has accepted Islam and grown up in a faithful Muslim family must remain adherent to Islam and if he denies one of the tenets of Islam and embarks openly on opposing it spreading evil and disturbing public mind about right and wrong, he has committed a crime for which he must also undergo punishment.
That is, the punishment of an apostate is because of the social aspect of his crime. He is punished even if he has put all his efforts into knowing the truth, and he may not be guilty of a sin in the domain pertaining to individual rules.
To clarify the answer, it is necessary to pay attention to a few points concerning the apostate, the negative consequences of apostasy, legal rules of apostasy, the philosophy of punishing the apostate etc.
First point: Who is an apostate?
An apostate (murtad) is one who renounces Islam and adopts a non-Muslim faith. If a person renounces the religion itself or denies one of the fundamentals of faith (like belief in Allah or the Prophet Muhammad (p.b.u.h.) or resurrection) or denies one of the indisputable commandments of Islam, like, prayers and fasting being obligatory, in a manner that its denial amounts to denial of the Prophet (p.b.u.h.) and he is conscious of the implications of the act of renouncing Islam, he has become an apostate.
Murtad (apostate) can be of two types: fitri and milli.
(1) Murtad Fitri means a person whose parents had been Muslim when he was conceived and he himself was also a Muslim, till after having reached the age of puberty, and thereafter he converted to become a non-Muslim. [Fitri means nature or natural. The term "murtad fitri" implies that the person has apostatized from his nature, the nature of believing in God.]
(2) "Murtad Milli" means a person whose parents had been disbelievers when he was conceived and then he expressed disbelief in Islam after attaining the age of puberty and thereafter he converted to Islam and then again converted to become a non-Muslim.
Second point: The Rules Concerning Apostasy in Divine Religions and Islamic Sects
In Shiite jurisprudence there are certain civil codes in regards to inheritance and marital relationship of an apostate which we are not going to deal with because they do not relate to the question. As for the penal rules concerning an apostate, fitri apostate is killed and his repentance is not accepted by the judge whereas a milli apostate is first asked to repent. If repents, he will be set free, or else he shall be killed. A female apostate is not killed irrespective of whether she is milli or fitri; rather she is told to repent. If she repents, she will be free; otherwise she will remain in jail.
According to Sunni jurisprudence and based on a famous opinion existing amongst the Sunni jurists, the apostate – be he milli or fitri, male or female – is told to repent. If he/she repents, he/she will be set free; otherwise he/she will be killed.
Apostasy is considered to be a sin in other divine faiths also and death is prescribed as the penalty for it.
It can therefore be said that apostasy is a sin according to all divine religions and faiths and (based on various conditions) the punishment set for it is death.
Third point: The Rationale behind the Punishment of an Apostate
In order to clarify the rationale behind the punishment of an apostate, it is necessary to take notice of the following points:
1. Islamic laws are divided into two categories namely the rules relating to the individual and the rules relating to the human society. The rules relating to the human society are created on the basis of social expediencies. Sometimes procurement of these expediencies undeniably limits part of the individual freedoms.
2. If an apostate has put all his efforts into knowing the truth, he will be excused, so God, the Almighty, will not punish him as he is not really a criminal within the realm of individual rules pertaining to him. However, if he has been guilty of knowing the truth, he is considered to be also a criminal within the realm of the rules relating to the individual. In fact, whenever an apostate makes public announcement of his apostasy, his act of doing so will be included in the social rules. Thus, the standards of the rules relating to the human society will be applicable to him and he will be considered as sinful from this perspective because: Firstly, he has violated others' rights for he has created doubts in public mind. Obviously, creating doubt in public mind will weaken the ideological spirit of the society. Since it is only the experts and religionists who are capable of examining and studying spurious arguments, the general public that lack the ability to verify the truth believe that it is their right to have a healthy public atmosphere in the society.
Secondly, over and above to the necessity of preserving the ideological spirit of the society as the right of the general public, Islam considers it to be part of the social interest and public good. That is why, it has encouraged people to respect the signs of the religion and stay away from breaking it.
The conclusion is that apostasy perhaps may not be a crime from the perspective individual law but it is a crime from the perspective of social law.
3- Given that apostasy is a crime, the rationales of the punishment for this crime can be explained as under:
A) Deserving punishment: The punishment of an apostate is because the crime he has committed and which has disturbed the ethical order. The greater the ethical and religious disorder and also violation of public rights, the severer would be the punishment. Obviously, a society in which the religious spirit is weakened will be deprived of real prosperity, even though it may be technologically very advanced. That is why any act other than apostasy (e.g. insulting the Holy Prophet and the Infallible Imams ) that weaken the beliefs and faith of the public will entail severe punishment for the perpetrator; because once the religious sanctities are violated, then eventually the religion itself will be gradually distorted or even destroyed.
B) Punishment prevents further propagation of propagation of apostasy by the criminal: Insofar as the apostate has not declared his apostasy, he is not committed a social crime. The severe punishment set by Islam for apostasy prevents apostasy from further spreading.
C) Demonstrating the importance of religion in the society: Every legal and penal system shows, through legislating laws, what matters are more important for it. Considering severe punishments for apostasy signifies the importance of maintaining the spirit that originates in the people's faith.
D) Persuading to think deeper over the religion before converting to it: Punishment of an apostate prompts a non-Muslim to accept Islam with more awareness, caution and accuracy. Thus, it will prevent from a cursory and shallow faith.
E) Reduced punishment in the Hereafter: Punishment in this world will cause reduction of punishments in the hereafter. God, the Exalted, is too kind to punish a person for a sin twice. There are narrations in this regard which imply that the belief that punishment in this world purifies the sinner for the next world did exist in the early period of Islam and that some criminals were encouraged to confess their sins so as to get punished in this world.
Note: Although punishment in this world causes punishments in the Hereafter to be reduced, God, the Exalted, has shown man another way of getting purified in this world and that is 'genuine repentance'. If a sinner repents genuinely, his sin will be forgiven without the need to get punished in this world.
4- Precaution in legislation: Perhaps, the rationales which were mentioned for punishment and also the Quranic verses about the conspiracies of the People of the Scripturemay not be applicable to all apostates. That is, the apostate may not conspire against the public belief or his apostasy may not have those negative impacts on the public faith, yet Islam subjects him to the same punishment. What is the reason behind it? In other words, why does Islam subjects an apostate to the same punishment while he may not have had the intention to conspire against Islam or when his apostasy does not have any negative effects on the public mind?
The answer is that every legislator considers a wider scope termed as "precaution in legislation" for the law than its rationale. There are two reasons for it:
A) Sometimes the provisions and stipulations which precisely determine the subject are in a way such that they cannot be discerned by every human individual. For example, the philosophy of "No Parking" in a street is to control traffic in that street and this philosophy does not exist on those days on which there is light traffic or no traffic in the street. However, the traffic police prohibit parking in that street permanently and continuously because it cannot let people to decide by themselves about the traffic jam and congestion.
B) Sometimes the law is so important that the legislator exercises precaution and expands the boundary of the law so as to make sure that the people will carry it out. Take the example of a military base or an army installation which must remain hidden and which people should not see. The installation remains hidden from a distance of 5 kms but the army increases the distance to many folds to make sure that the installation is completely invisible and safe
The position is the same with Islamic legislation as God widens the boundaries of the laws in comparison to its philosophy so that the entire rationales may be achieved.
For further reading about the rationales of Islamic punishments vide:
- Philosophy of Law, Qudratullah Khosroshahi – Mustafa Danish Pazhu, Imam Khomeini Educational and Research Institute, pg.201-222.
- Divine Justice, Shahid Mutahhari, Sadra Publications.
- Also see: The Commentary of Verse "There is no compulsion in the religion" in Tafsir al-Mizan, vol.2, pg.278 and Tafsir Nemouneh, vol.2, pg.360.
 - "There is no compulsion in the religion", Chapter al-Baqarah of the Quran, verse 256.
 - For further reading, vide: "Understanding the Islamic Religions" (15), questions and answers according to Shiite and Sunni religions, pg.116 – 117.
 - Imam Khomeini, Tahrirul Wasilah, vol.2, pg.366; Ibn-e Qudamah, al-Mughni, vol.10, pg.74.
 - Imam Khomeini, Tahrirul Wasilah, vol.1, pg.118.
 - Imam Khomeini, Tahrirul Wasilah, vol.2, pg.336. Some scholars have tipulated "one of the parents" as a condition for the fitri type of apostasy (Khoei, Mabani Takmelatul Minhaaj, vol.2, pg.451) and some others do not consider expressing belief in Islam as a necessary condition (Shahid Thani, Masalek al-Efham, vol.2, pg.451).
 - Imam Khomeini, Tahrirul Wasilah, vol.2, pg.336.
 - Imam Khomeini, Tahrirul Wasilah, vol.2, pg.494
 - Abdur Rahman al-Jaziri, Al-Fiqh alaa al-Mazaheb al-Arba'ah, vol.5, pg.424. Abu Hanifa's fatwa is like that of the Shiite's in considering different rules for a male and a female apostate. (Abu Bakr al-Kasani, Badaye' al-Sanaye', vol.7, pg.135) and Hasan Basra does not accept the necessity of telling the apostate to repent (Ibn-e Qudamah, al-Mughni, vol.10, pg.76.)
 - Vide: The Old Testament, Safar Touriyah Musanna, chapter 13; the Holy Scripture, Farsi translation by William Gelen, King's House, London, 1856 pg.357-8; the Holy Scripture, Darul Mashriq, Beirut. Sifr Thuniyatul Ishtera', chapter 13, pg.379-80, the New Testament, Interpretation and Translation Organization of Holy Scripture, Tehran, 1357, pg.305-6.
 - Some believe that the death sentence for an apostate is a punishment not penalty. Thus, they that the punishments are the right of the Islamic ruler and there is no fixed standard for it. Therefore, it cannot be said that death is the punishment for apostasy in Islam. Vide: Husain Ali Montazeri, Derasaat fi Wilayat al-Faqih wa Fiqh al-Doulah al-Islamiyah, vol.3, pg.387. Also, see: Eisa Wilayi, Apostasy in Islam, pg.129-148.
 - Hajj, 32
 - Ma'edah: 2
 - Aal-e Imran: 72