وَقَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ : " لَا يَزَالُ أَحَدُكُمْ فِي صَلَاةٍ مَا كَانَتْ الصَّلَاةُ هِيَ تَحْبِسُهُ ، لَا يَمْنَعُهُ إِلَّا انْتِظَارُهَا " .
And the Prophet Muhammad (peace and blessings be upon him) said: As long as a person waits for the prayer, he is counted as being in prayer. It is the waiting for the prayer that keeps him detained in the mosque.