(16) باب فِي الْمَجْنُونِ يَسْرِقُ أَوْ يُصِيبُ حَدًّا
Narrated Ali ibn AbuTalib:
Ibn Abbas said: A lunatic woman who had committed adultery was brought to Umar. He consulted the people and ordered that she should be stoned. Ali ibn AbuTalib passed by and said: What is the matter with this (woman)? They said: This is a lunatic woman belonging to a certain family. She has committed adultery. Umar has given orders that she should be stoned. He said: Take her back. He then came to him and said: Commander of the Faithful, do you not know that there are three people whose actions are not recorded: a lunatic till he is restored to reason, a sleeper till he awakes, and a boy till he reaches puberty? He said: Yes. He then asked: Why is it that this woman is being stoned? He said: There is nothing. He then said: Let her go. He (Umar) let her go and began to utter: Allah is most great.
Reference: Sunan Abi Dawud 4399
In-book reference: Book 40, Hadith 49
English translation: Book 39, Hadith 4385