Fifth: Intention
Among the conditions of prayer is intention (niyyah). Linguistically it means “purpose,” while in the technical sense it is the firm resolve to perform an act of worship in order to draw nearer to Allah.
Its place is the heart; uttering it aloud is unnecessary and, in fact, an innovation that neither the Messenger of Allah nor his Companions ever practised. Thus a worshipper forms in his heart the particular prayer he intends—such as the noon (zuhr) or afternoon (ʿasr) prayer—in light of the ḥadīth, “Actions are judged only by intentions.” The intention should accompany the takbīrat al-iḥrām (opening takbīr) so that it coincides with the act of worship, and if it precedes it by a brief moment within the prayer’s prescribed time, there is no harm.
The intention must remain continuous throughout the entire prayer; if it is broken during the prayer, the prayer is invalid.
A person who has begun an obligatory prayer, whether praying alone or behind an imam, may turn it into a voluntary prayer for a legitimate reason—such as when he starts the prayer alone and then decides to join the congregation.
Be aware that some people have introduced innovations and unwarranted strictness concerning intention. One of them will say, “I intend to pray the obligatory such-and-such prayer of such-and-such number of rakʿahs, for the sake of Allah, behind this imam…” and similar formulas. The Messenger of Allah never did this; nothing has been transmitted from him to show that he articulated the intention—whether silently or aloud—nor did he instruct anyone to do so.