O you who have believed, do not approach prayer while you are intoxicated until you know what you are saying1 or in a state of janābah,2 except those passing through [a place of prayer], until you have washed [your whole body]. And if you are ill or on a journey or one of you comes from the place of relieving himself or you have contacted women [i.e., had sexual intercourse] and find no water, then seek clean earth and wipe over your faces and your hands [with it]. Indeed, Allāh is ever Pardoning3 and Forgiving.
Translation: Saheeh International (English)
1 The use of intoxicants was later prohibited completely. See 5:90-91.
2 Literally, "distance." The state of one under obligation to perform ghusl (a complete bath) due to having had sexual intercourse or ejaculation.
3 Literally, able to erase and remove sins completely, leaving no trace of them in the record of deeds.
O you who have faith in Allah and follow His Messenger, do not pray when you are drunk, until you recover from your drunkenness, and can tell what you are saying. (This ruling was before alcohol was completely forbidden.) Do not pray when you are in a state of major ritual impurity, and do not enter the mosques when you are in that state, except in passing, until you have washed your body. If you have an illness and cannot use water because of it, or if you are travelling, or have answered the call of nature, or have had sexual relations with women, and you cannot find water, then find clean earth, and wipe your faces and hands with it. Allah pardons your shortcomings and is Forgiving to you.