If I thought that the call of prayer (Adhan) for `Asr (Afternoon) prayer had been made, then I intended to offer the Nafl prayer of `Asr, but at the last rak`ah I heard the Adhan again. Therefore, I changed my intention from the Nafl to the obligatory prayer of Dhuhr (Noon) as I had missed it. Is my prayer valid?
Once Sheikh Ibn ‘Uthaymeen was asked about changing the intention in prayer, and his answer was as follows:
Changing the intention means either changing it from one specific thing to another or from something general to something specific. This is not correct, but if it is changing it from something specific to something general, then there is nothing wrong with that.
Changing from one specific thing to another: A person wanted to change the Sunnah prayer of Duha to the regular prayer of Fajr (Dawn Paryer) which he had missed and wanted to make up for it. He said takbeer with the intention of offering two rak`ahs of Duha, then he remembered that he had not offered the regular prayer of Fajr, so he changed it to the regular prayer of Fajr. This is not valid, because the regular prayer of Fajr is two rak`ahs for which he should have had the intention from the beginning of the prayer.
Responding to this question, Sheikh Ahmad Al-Hijji Al-Kurdi, an expert in the Encyclopedia of Jurisprudence and a member of the Kuwaiti Ifta department of the Ministry of Awqaf and Islamic Affairs, states:
Changing prayer in such a way is invalid.