حَدَّثَنَا يَحْيَى بْنُ عُثْمَانَ، ثَنَا أُصْبَغُ بْنُ الْفَرَجِ، ثَنَا ابْنُ وَهْبٍ، أَخْبَرَنِي عَمْرُو بْنُ الْحَارِثِ، ح، وَحَدَّثَنَا يَحْيَى بْنُ أَيُّوبَ الْعَلَّافُ، ثَنَا سَعِيدُ بْنُ أَبِي مَرْيَمَ، أَنَا يَحْيَى بْنُ أَيُّوبَ، حَدَّثَنِي عَمْرُو بْنُ الْحَارِثِ، أَنَّ أَبَا عُشَّانَةَ حَدَّثَهُ، عَنْ عُقْبَةَ بْنِ عَامِرٍ، عَنْ رَسُولِ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ قَالَ: «مَنْ تَوَضَّأَ فَجَمَعَ ثِيَابَهُ، ثُمَّ خَرَجَ إِلَى الْمَسْجِدِ، كَتَبَ لَهُ كَاتِبُهُ بِكُلِّ خَطْوَةٍ عَشْرَ حَسَنَاتٍ، وَالْمَرْءُ فِي صَلَاةٍ مَا كَانَ يَنْتَظِرُ الصَّلَاةَ، وَيُكْتَبُ مِنَ الْمُصَلِّينَ مِنْ حَيْثُ يَخْرُجُ مِنْ بَيْتِهِ حَتَّى يَرْجِعَ»
It is narrated from Sayyiduna Uqbah bin Amir (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever performs ablution, then gathers his garments, then goes out to the mosque, the angel who records for him writes ten good deeds for every step; a person is counted as being in prayer as long as he is waiting for the prayer; and from the time he leaves his house until he returns, he is recorded among those who pray."