Sayyiduna Zayd bin Thabit (may Allah be pleased with him) said: I was walking with the Messenger of Allah (peace and blessings be upon him) and we were intending to pray, and he (peace and blessings be upon him) was shortening his steps. He (peace and blessings be upon him) said: "Do you know why I am shortening my steps?" I said: Allah and His Messenger know best. He (peace and blessings be upon him) said: "As long as a servant is in pursuit of the prayer, he is, as it were, in prayer."
Hadith Referenceالمعجم الكبير للطبراني / باب الزاي / 4782