Sahih Muslim
Sahih Muslim 520b
حَدَّثَنِي عَلِيُّ بْنُ حُجْرٍ السَّعْدِيُّ، أَخْبَرَنَا عَلِيُّ بْنُ مُسْهِرٍ، حَدَّثَنَا الأَعْمَشُ، عَنْ إِبْرَاهِيمَ بْنِ يَزِيدَ التَّيْمِيِّ، قَالَ كُنْتُ أَقْرَأُ عَلَى أَبِي الْقُرْآنَ فِي السُّدَّةِ فَإِذَا قَرَأْتُ السَّجْدَةَ سَجَدَ فَقُلْتُ لَهُ يَا أَبَتِ أَتَسْجُدُ فِي الطَّرِيقِ قَالَ إِنِّي سَمِعْتُ أَبَا ذَرٍّ يَقُولُ سَأَلْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم عَنْ أَوَّلِ مَسْجِدٍ وُضِعَ فِي الأَرْضِ قَالَ " الْمَسْجِدُ الْحَرَامُ " . قُلْتُ ثُمَّ أَىٌّ قَالَ " الْمَسْجِدُ الأَقْصَى " . قُلْتُ كَمْ بَيْنَهُمَا قَالَ " أَرْبَعُونَ عَامًا ثُمَّ الأَرْضُ لَكَ مَسْجِدٌ فَحَيْثُمَا أَدْرَكَتْكَ الصَّلاَةُ فَصَلِّ " .
Ali ibn Hujr al-Sa'di narrated to me: Ali ibn Mushir informed us: al-A'mash narrated to us, from Ibrahim ibn Yazid al-Taymi. He said: I used to recite the Qur'an to my father in the entrance area. Whenever I recited a verse of prostration, he would prostrate. I said to him, ‘Father, do you prostrate in the road?’ He said: I heard Abu Dharr say: I asked the Messenger of Allah (peace and blessings be upon him) which mosque was established first on earth. He said: ‘Al-Masjid al-Haram.’ I asked, ‘Then which one?’ He said: ‘Al-Masjid al-Aqsa.’ I asked, ‘How many years were between them?’ He said: ‘Forty years. Then the whole earth is a place of prayer for you, so wherever the time for prayer comes upon you, pray.’