Once a mad woman was brought to the court of Umar. The charge of adultery was established against her. Umar was inclined to sentence her to the penalty of being stoned to death but he deemed it necessary to consult Ali before delivering the judgment. Ali advised that the penal law of Islam was applicable only in such cases where the person concerned was in proper senses, and could be held responsible for his action. Where a person was not in proper senses, he could not be held accountable for his actions. The view of Ali was accepted and the mad woman was let off.