[Machine] Ali said to Umar, "Oh Commander of the Believers, have you ordered the stoning of so-and-so?" Umar replied, "Yes." Ali then said, "Don't you remember the saying of the Messenger of Allah ﷺ , 'The pen has been lifted from three: the sleeper until he wakes up, the child until he reaches puberty, and the insane until he regains sanity?'" Umar responded, "Yes." So he revoked the order.
عَلِيٌّ بِمَجْنُونَةِ بَنِي فُلَانٍ قَدْ زَنَتْ وَهِيَ تُرْجَمُ فَقَالَ عَلِيٌّ لِعُمَرَ ؓ يَا أَمِيرَ الْمُؤْمِنِينَ أَمَرْتَ بِرَجْمِ فُلَانَةَ؟ قَالَ نَعَمْ قَالَ أَمَا تَذْكُرُ قَوْلَ رَسُولِ اللهِ ﷺ رُفِعَ الْقَلَمُ عَنْ ثَلَاثٍ عَنِ النَّائِمِ حَتَّى يَسْتَيْقِظَ وَعَنِ الصَّبِيِّ حَتَّى يَحْتَلِمَ وَعَنِ الْمَجْنُونِ حَتَّى يُفِيقَ ؟ قَالَ نَعَمْ فَأَمَرَ بِهَا فَخَلَّى عَنْهَا