Sayyiduna Ibn Abbas (may Allah be pleased with them both) narrates that Sayyiduna Ali bin Abi Talib (may Allah be pleased with him) passed by a mad woman from a certain tribe who had committed adultery, and Sayyiduna Umar (may Allah be pleased with him) had ordered her to be stoned. Sayyiduna Ali (may Allah be pleased with him) sent her back and said to Sayyiduna Umar (may Allah be pleased with him): "O Commander of the Believers, will you stone her?" He replied, "Yes." So Sayyiduna Ali (may Allah be pleased with him) said, "Do you not remember the statement of the Messenger of Allah (peace and blessings be upon him) that he said: 'The pen has been lifted from three (i.e., they are not held accountable by the Shari'ah): 1. The insane person whose mind is overcome. 2. The sleeping person until he wakes up. 3. The child until he reaches puberty.'" So Sayyiduna Umar (may Allah be pleased with him) said, "You have spoken the truth." Then he set the woman free.