Sayyiduna Abu Hurayrah (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) said: "Shall I not tell you of the deed by which sins are erased and ranks are raised?" They said: Of course, O Messenger of Allah! He (peace and blessings be upon him) said: "Performing ablution thoroughly at times of hardship, walking to the mosques, that is, taking many steps, and waiting for the next prayer after a prayer; this is ribat (guarding the frontier)."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4969