It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "When one of you sets out with the intention of prayer, he is already in prayer."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجمعة / 5872