The hadd punishment for zina is dropped when doubts arise, and when the confession is retracted.
➊ It is narrated from Ibn Mas’ud (may Allah be pleased with him) that:
ادرء وا الحدود بالشبهات ما استطعتم
“Drop the hudud punishments because of doubts, as far as you are able.”
[Da’if (weak): Irwa al-Ghalil: 2316, Bayhaqi: 238/8, Tarikh Dimashq by Ibn Asakir: 2/171/19]
Imam Ibn Hazm (may Allah have mercy on him) reported this hadith in Kitab al-Isal from Umar (may Allah be pleased with him) as mawquf (a statement of the Companion). Hafiz Ibn Hajar (may Allah have mercy on him) declared its chain of narration sahih (authentic).
[Talkhis al-Habir: 56/4, Nayl al-Awtar: 553/4]
➋ Umar ibn al-Khattab (may Allah be pleased with him) said: “To drop the hudud punishments because of doubts is more beloved to me than to carry them out despite doubts.”
[Ibn Abi Shaybah: 2/70/11]
(Shawkani) Regarding the first hadith he says: it is correct to take from this hadith the evidence that it is prescribed to remove the hudud punishments because of probable doubts (doubts that create a possibility).
[Nayl al-Awtar: 553/4]
➌ In a hadith, the Prophet ﷺ said:
لو كنت راجما أحدا بغير بينة لرجمتها
“If I were to stone anyone without proof, I would have stoned this woman (the wife of Ajlani).”
[Muslim: 1497, Kitab al-Li’an: Bab]
Abu Hurayrah (may Allah be pleased with him) said: When Ma’iz (may Allah be pleased with him) confessed to zina for the fourth time, the Prophet ﷺ commanded that he be stoned. He was taken to a stony plain and stoned. When he felt the pain of the stones, he quickly fled. He passed by a man who had the jawbone of a camel; he struck him with the bone, and then the other people also struck him until he died. This was mentioned to the Messenger of Allah ﷺ, that when he felt death from the stones he had fled. At that, the Messenger of Allah ﷺ said:
هلا تركتموه
“Why did you not leave him?”
[Hasan sahih (good and authentic): Sahih Ibn Majah: 2068, Kitab al-Hudud: Bab al-Rajm, Irwa al-Ghalil: 353/1, Tirmidhi: 1428, Ahmad: 286/2, Ibn Majah: 2554, Hakim: 363/4, Ibn Hibban: 2422]
In one narration the words are:
هلا تركتموه لعله أن يتوب فيتوب الله عليه
“Why did you not leave him? Perhaps he would have repented, and then Allah the Exalted would have accepted his repentance.”
[Sahih (authentic): Sahih Abi Dawud: 3716, Kitab al-Hudud: Bab Rajm Ma’iz ibn Malik, Abu Dawud: 4419, Nasa’i: 305/4, Irwa al-Ghalil: 2322. Shaykh al-Albani (may Allah have mercy on him) declared the rest of the hadith sahih (authentic) except for the words لعله أن يتوب.]
(Ahmad, Shafi’i, Abu Hanifah) The retraction of one who has confessed will be accepted, and the hadd will then be dropped from him.
(Ibn Abi Layla, Abu Thawr) A retraction after the confession will not be accepted. According to one narration, this is also the position of Imam Malik.
[Nayl al-Awtar: 500/4]
(Mulla Ali Qari) The Messenger of Allah ﷺ commanded that he be left because perhaps he would have retracted from this act of his, and Allah the Exalted would also have turned to him, that is, accepted his repentance.
[Mirqat: 152/7]
(Baghawi) This hadith contains evidence that if a person who has confessed to zina denies it during the carrying out of the hadd, and says that he had lied, or says that he did not commit zina, or says “I retract”, then the remainder of the hadd is dropped from him; and the same applies to the thief and the one who drinks alcohol.
[Sharh al-Sunnah: 467/5, Tuhfat al-Ahwadhi: 796/4]