Praise be to Allah.
If there is a reason for doing tayammum – such as non-availability of water, or being unable to use it because of sickness etc – then tayammum takes the place of wudu and ghusl. So the person who is junub should do tayammum and pray, then when he finds water he has to do ghusl.
This is indicated by the Quran and Sunnah.
1 – Allah says (interpretation of the meaning):
“O you who believe! When you intend to offer As-Salah (the prayer), wash your faces and your hands (forearms) up to the elbows, rub (by passing wet hands over) your heads, and (wash) your feet up to the ankles. If you are in a state of Janaaba (i.e. after a sexual discharge), purify yourselves (bathe your whole body). But if you are ill or on a journey, or any of you comes after answering the call of nature, or you have been in contact with women (i.e. sexual intercourse), and you find no water, then perform Tayammum with clean earth and rub therewith your faces and hands” [al-Maa’idah 5:6]
So Allah has enjoined upon us both minor and major purification, and tayammum could take the place of either of them. This was stated by Shaykh al-Islam Ibn Taymiyah in Majmoo’ al-Fatawa (21/396). Minor purification is wudu and major purification is ghusl.
2 – al-Bukhaari narrated in two places (344 and 348) from ‘Imraan ibn Husayn (may Allah be pleased with him) that the Messenger of Allah (peace and blessings of Allah be upon him) saw a man keeping away and not praying with the people. He said, “O So and so, what kept you from praying with the people?” He said, “O Messenger of Allah, I became junub and there is no water.” He said, “You should use clean earth, for it will suffice you.” According to another report the Prophet (peace and blessings of Allah be upon him) found water and gave a vessel of water to the one who had become junub, and said, “Go and pour this over yourself.”
This indicates that tayammum is a means of purification and suffices instead of water, but if water is available then it must be used. Hence the Prophet (peace and blessings of Allah be upon him) told him to pour it on himself even though no new janaabah had occurred. This was stated by Ibn ‘Uthaymeen in Majmoo’ al-Fatawa, 11/239.
3 – Muslim (368) narrated that a man came to ‘Umar and said: “I have become junub and I cannot find any water.” He said: “Do not pray.” ‘Ammaar said: “Do you not remember, O Ameer al-Mu’mineen, when you and I were on a campaign and we become junub, and we could not find any water? You did not pray, but I rolled in the dust and prayed, and the Prophet (peace and blessings of Allah be upon him) said, ‘It would have been sufficient if you had struck the ground with your hands then wiped your face and hands with them.’” ‘Umar said: “Fear Allah, O ‘Ammaar!” He said, “If you wish I will not narrate it.” ‘Umar said: “We accept what you say.” According to another report, ‘Ammaar said: “O Ameer al-Mu’mineen, if you wish, because of your position, I will not tell it to anyone.”
‘Umar (may Allah be pleased with him) had forgotten that event.
“ ‘Umar said: ‘Fear Allah, O ‘Ammaar!’” – What this means is that ‘Umar said to ‘Ammaar: Fear Allah with regard to what you are narrating, for perhaps you have forgotten or become confused. With regard to ‘Ammaar saying, “If you wish I will not narrate it,” what this means – and Allah knows best – is: If you think it is better for me to refrain from narrating it than to narrate it, then I will refrain, because it is obligatory for me to obey you so long as that does not involve sin. The basic principle with regard to conveying knowledge had already been fulfilled, and if he had withheld this hadeeth after that, he would not have come under the heading of those who withhold knowledge. It may be that he meant, ‘I will not broadcast it so that it becomes well known among people, rather I will only narrate it rarely.’ This was stated by al-Nawawi.
“ ‘Umar said “We accept what you say” – i.e., the fact that I do not remember it does not means that it is not true, and I have no right to stop you narrating it. This was stated by al-Haafiz in Fath al-Baari.
4 – Abu Dawood (334) narrated that ‘Amr ibn al-‘Aas said: I had a wet dream on a cold night during the campaign of Dhaat al-Salaasil, and I was afraid that I would die if I did ghusl, so I did tayammum then I led my companions in praying Fajr. They mentioned that to the Prophet (peace and blessings of Allah be upon him) and he said: “O ‘Amr, you led your companions in prayer when you were junub?” So I told him what had kept me from doing ghusl. I said: “I heard that Allah says (interpretation of the meaning): ‘And do not kill yourselves (nor kill one another). Surely, Allah is Most Merciful to you’ [al-Nisa’ 4:29]. The Messenger of Allah (peace and blessings of Allah be upon him) smiled and did not say anything.
Al-Haafiz said in al-Fath (1/589): its isnaad is qawiy (strong). It was classed as saheeh by al-Albaani in Saheeh Abi Dawood.
Al-Bukhaari (may Allah have mercy on him) said in his Saheeh: “If a person who is junub fears that he may become ill or die or fears thirst then he should do tayammum,” and he mentioned that ‘Amr ibn al-‘Aas became junub on a cold night so he did tayammum, and recited (the verse) (interpretation of the meaning): ‘And do not kill yourselves (nor kill one another). Surely, Allah is Most Merciful to you’ [al-Nisa’ 4:29]. He mentioned that to the Prophet (peace and blessings of Allah be upon him) and he did not rebuke him.
Shaykh al-Islam Ibn Taymiyah said in Majmoo’ al-Fatawa (21/451):
Whoever becomes junub whether as the result of a wet dream or intercourse – permissible or forbidden – has to do ghusl and pray. If he is unable to do ghusl because there is no water or because he will be harmed by using it – such as if he is sick and using water will make his sickness worse, or there is a cold wind and he fears that if he does ghusl he will become sick with a headache or cold or bronchitis – then he should do tayammum and pray. This applies equally to men and women. He (or she) does not have the right to delay the prayer beyond its prescribed time.”
Shaykh Ibn Baaz was asked in Majmoo’ al-Fatawa (10/201):
Does tayammum mean that the junub person no longer has to do ghusl at all? How many prayers may he offer with tayammum?
Tayammum takes the place of water, as Allah has made the earth a place of worship and a means of purification for the Muslims. If no water is available or the person is unable to use it because of sickness, then tayammum takes its place and remains sufficient until he finds water. When he finds water he has to do ghusl to cleanse himself of the previous janaabah. Similarly if the sick person recovers and Allah heals him, he has to do ghusl to cleanse himself from the previous janaabah from which he had purified himself by means of tayammum, because the Prophet (peace and blessings of Allah be upon him) said: “Clean earth is the wudu of the Muslim if he cannot find water for ten years.” Then he said: “When you find water, then make it touch your skin.” Narrated by al-Tirmidhi from the hadeeth of Abu Dharr (may Allah be pleased with him); narrated by al-Bazzaar and classed as saheeh by Ibn al-Qattaan, from the hadeeth of Abu Hurayrah may Allah be pleased with him.
If the junub person finds water then he should make it touch his skin, i.e. wash with it. With regard to his past prayers, they are valid by virtue of the tayammum he did when water was not available or he was unable to use it, because of sickness that prevented him from using it, until the sickness ends and he recovers and until he finds water, if none was available, even if that takes a long time.