248 — “You have entered Islam along with whatever good you had previously done.”
Ibn Ḥazm said: From this it is clear that when an apostate returns to Islam, or when a person who has never been Muslim accepts it for the first time, they both enter Islam together with every good deed they performed beforehand. As for the apostate, if he had performed Hajj while still a Muslim, he had already fulfilled what was required of him exactly as he had been commanded; therefore, now that he has re-embraced Islam, that Hajj remains valid for him just as it was before. By contrast, a disbeliever who makes pilgrimage—such as the Sabians, who regard the pilgrimage to Mecca as part of their religion—if he later becomes Muslim, that pilgrimage does not count for him, because he did not perform it in the manner Allah Most High prescribed. One of the conditions governing Hajj and all other acts of worship is that they be carried out only in the way taught by the Messenger of Allah, Muhammad ibn ʿAbd Allah ﷺ, in the religion he brought, a religion besides which Allah accepts none. He ﷺ said:
“Whoever performs an act that is not in accordance with our instruction will have it rejected.”
Thus the Sabian merely performed pilgrimage according to the directions of Yurasaf or Hermes, and so it does not fulfil the obligation. Success is granted by Allah alone.
Whoever rules that a man’s Hajj is invalidated by his apostasy must, by the same logic, also invalidate his marital status, his pronouncements of triple divorce, his transactions of sale and purchase, and the gifts he gave while he was a Muslim—yet they do not say this. The unsoundness of their position is therefore manifest; with Allah Most High we seek strength.
With this understood, there is no contradiction between the foregoing discussion and the earlier ḥadīth numbered 52—“A disbeliever is rewarded in this world for the good deeds he performs for Allah’s sake”—for what is meant there is the disbeliever whom Allah’s pre-eternal knowledge has decreed will die upon disbelief, as is shown by the ḥadīth’s closing words: “until, when he reaches the Hereafter, he will have no good deed for which he will be rewarded.” As for the disbeliever whom Allah knew would later embrace Islam and die a believer, he will indeed be recompensed in the Hereafter for the good deeds he performed while in a state of disbelief, exactly as the previously cited aḥādīth have indicated—among them the ḥadīth of Ḥakīm ibn Ḥizām that Ibn Ḥazm quoted, graded authentic, and did not attribute to any author. In fact, it is recorded by al-Bukhārī in his Ṣaḥīḥ (4/327; 5/127; 10/348), Muslim (1/79), Abū ʿAwāna in his Ṣaḥīḥ (1/72–73), and Aḥmad (3/402).