[Machine] Ali encountered a woman from the tribe of Fulan who had committed adultery and was about to be stoned. Ali asked Umar, "O Commander of the Believers, did you order the stoning of this woman?" Umar replied, "Yes." Ali then reminded Umar of the saying of the Prophet ﷺ, 'The pen is lifted from three: from the sleeper until he wakes up, from the child until he reaches puberty, and from the insane until he regains sanity.' Umar acknowledged this and revoked the order. This narration is transmitted by Ata bin Sa'ib from Abu Dhubiyan as a marfu' hadith.
مُرَّ عَلَى عَلِيٍّ بِمَجْنُونَةِ بَنِي فُلَانٍ قَدْ زَنَتْ وَهِيَ تُرْجَمُ فَقَالَ عَلِيٌّ لِعُمَرَ ؓ يَا أَمِيرَ الْمُؤْمِنِينَ أَمَرْتَ بِرَجْمِ فُلَانَةٍ؟ قَالَ نَعَمْ قَالَ أَمَا تَذْكُرُ قَوْلَ رَسُولِ اللهِ ﷺ رُفِعَ الْقَلَمُ عَنْ ثَلَاثَةٍ عَنِ النَّائِمِ حَتَّى يَسْتَيْقِظَ وَعَنِ الصَّبِيِّ حَتَّى يَحْتَلِمَ وَعَنِ الْمَجْنُونِ حَتَّى يُفِيقَ ؟ قَالَ نَعَمْ فَأَمَرَ بِهَا فَخَلَّى عَنْهَا وَرَوَاهُ عَطَاءُ بْنُ السَّائِبِ عَنْ أَبِي ظَبْيَانَ مُرْسَلًا مَرْفُوعًا