he is asked to repent three times; if he repents, otherwise he is executed,” because he deliberately and wrongfully killed someone whose blood was inviolable.
His statement, “or takes lawful medicine,” indicates that if a person loses his mind through something prohibited—for example, by deliberately drinking an intoxicant—he is held accountable for his statements. His ruling is that of one who retains his reason: if he divorces his wife, the divorce takes effect; if he acknowledges a financial liability, he is bound by what he acknowledged; and if he apostatizes, the ruling of apostasy is established against him and he is executed. This is the well-known position in the school of Imam Ahmad. The correct view, however, is otherwise: one who drinks an intoxicant despite its prohibition is not to be subjected to any discretionary punishment beyond what the Shariah has prescribed—namely, forty lashes, eighty lashes, or more, according to what will deter people from this prohibited drink. But to hold him accountable for his statements and actions while he is not conscious is not possible.
The scholars differed regarding his actions: is he held accountable for them?
The correct view is that his actions are like those of one who acts by mistake, not like those of one who acts deliberately. Thus, if he kills someone, retaliation is not carried out against him, because he has no reason; however, blood money is taken from him. This is unless we know that he consumed the intoxicant in order to carry out his act, in which case he is held accountable for it. For example, suppose this man wishes to kill someone and says: “If I kill him while sober, they will execute me in retaliation for him. But I will drink an intoxicant and kill him while intoxicated.” In this case, we say that he is to be executed, because he became intoxicated in order to commit the prohibited act. Matters are judged according to their intentions, as the Prophet, peace and blessings be upon him, said: “Actions are only by intentions, and every person shall have only what he intended.” (1)