I saw the Messenger of Allah (ﷺ) on the morning of the conquest of Mecca when I was a young boy. He was walking among the people, seeking the camp of Khalid ibn al-Walid. A man who had drunk wine was brought (before him) and he ordered them (to beat him). So they beat him with what they had in their hands. Some struck him with whips, some with sticks and some with sandals. The Messenger of Allah (ﷺ) threw some dust on his face. When a man who had drunk wine was brought before AbuBakr, he asked them (i.e. the people) about the number of beatings which they gave him. They numbered it forty. So AbuBakr gave him forty lashes. When Umar came to power, Khalid ibn al-Walid wrote to him: The people have become addicted to drinking wine and they look down upon the prescribed punishment and its penalty. He said: They are with you, ask them. The immigrants who embraced Islam in the beginning were with him. He asked them and they agreed on the fact that (a drunkard) should be given eighty lashes. Ali said: When a man drinks wine, he tells lies. I, therefore, think that he should be prescribed punishment that is prescribed for telling lies.. Abu Dawud said: ‘Uqail b. Khalid included in the chain of this tradition: “Abd Allah b. Abd al-Rahman b. al-Azhar from his father” between al-Zuhri and Ibn al-Azhar.
The Messenger of Allah (ﷺ) forbade to take retaliation in the mosque, to recite verses in it and to inflict the prescribed punishments in it.
That the Messenger of Allah (ﷺ) implemented the penalty by beating forty times, with two shoes – Mis’ar (one of the narrators) said: “It think it was for wine.”
“We went out with the Messenger of Allah (ﷺ), intending only to perform Hajj. When we were in Sarif or close to Sarif, my menses came. The Messenger of Allah (ﷺ) entered upon me when I was weeping. He said: ‘What is the matter with you? Have your menses come?’ I said: ‘Yes.’ He said: ‘This is something that Allah has decreed for the daughters of Adam. Do all the rites, but do not circumambulate the House.’” She said: “And the Messenger of Allah (ﷺ) sacrificed a cow on behalf of his wives.”