Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
nasai-kubra:11217ʿAlī b. Ḥujr > ʿAlī b. Mushir > al-Aʿmash > Ibrāhīm

I used to read the Qur'an with my father in the vestibule (before the door of the mosque). When I recited the ayat (verses) concerning prostration, he prostrated himself. I said to him: Father, do you prostrate yourself in the path? He said: I heard Abu Dharr saying: I asked the Messenger of Allah ﷺ about the mosque that was first set up on the earth. He said: Masjid Harim. I said: Then which next? He said: The Masjid al-Aqsa. I said: How long is the space of time between the two? He said: Forty years. He (then) further said: The earth is a mosque for you, so wherever you are at the time of prayer, pray there. (Using translation from Muslim 520b)  

الكبرى للنسائي:١١٢١٧أَخْبَرَنَا عَلِيُّ بْنُ حُجْرٍ حَدَّثَنَا عَلِيُّ بْنُ مُسْهِرٍ عَنِ الْأَعْمَشِ عَنْ إِبْرَاهِيمَ قَالَ

كُنْتُ أَقْرَأُ عَلَى أَبِي الْقُرْآنَ فِي السِّكَّةِ فَإِذَا قَرَأْتُ السَّجْدَةَ سَجَدَ قُلْتُ لَهُ يَا أَبَتِ تَسْجُدُ فِي الطَّرِيقِ؟ قَالَ إِنِّي سَمِعْتُ أَبَا ذَرٍّ يَقُولُ سَأَلْتُ رَسُولَ اللهِ ﷺ عَنْ أَوَّلِ مَسْجِدٍ وُضِعَ فِي الْأَرْضِ فَقَالَ «الْمَسْجِدُ الْحَرَامُ» قُلْتُ ثُمَّ أَيْ؟ قَالَ «الْمَسْجِدُ الْأَقْصَى» قُلْتُ كَمْ بَيْنَهُمَا؟ قَالَ «أَرْبَعُونَ عَامًا وَالْأَرْضُ لَكَ مَسْجِدٌ فَحَيْثُمَا أَدْرَكْتَ صَلَاةً فَصَلِّ»  


See similar narrations below:

Collected by Muslim, Nasāʾī, Nasāʾī's Kubrá
muslim:520a[Chain 1] Abū Kāmil al-Jaḥdarī > ʿAbd al-Wāḥid > al-Aʿmash [Chain 2] Abū Bakr b. Abū Shaybah And ʾAbū Kurayb > Abū Muʿāwiyah > al-Aʿmash > Ibrāhīm al-Taymī from his father > Abū Dhar

I said: Messenger of Allah, which mosque was set up first on the earth? He said: Al-Masjid al-Haram (the sacred). I (again) said: Then which next? He said: It was the Masjid Aqsa. I (again) said: How long the space of time (between their setting up)? He (the Holy Prophet) said: It was forty years. And whenever the time comes for prayer, pray there, for that is a mosque; and in the hadith transmitted by Abu Kamil (the words are):" Whenever time comes for prayer, pray, for that is a mosque (for you)."  

مسلم:٥٢٠aحَدَّثَنِي أَبُو كَامِلٍ الْجَحْدَرِيُّ حَدَّثَنَا عَبْدُ الْوَاحِدِ حَدَّثَنَا الأَعْمَشُ ح قَالَ وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ وَأَبُو كُرَيْبٍ قَالاَ حَدَّثَنَا أَبُو مُعَاوِيَةَ عَنِ الأَعْمَشِ عَنْ إِبْرَاهِيمَ التَّيْمِيِّ عَنْ أَبِيهِ عَنْ أَبِي ذَرٍّ قَالَ

قُلْتُ يَا رَسُولَ اللَّهِ أَىُّ مَسْجِدٍ وُضِعَ فِي الأَرْضِ أَوَّلُ قَالَ الْمَسْجِدُ الْحَرَامُ قُلْتُ ثُمَّ أَىٌّ قَالَ الْمَسْجِدُ الأَقْصَى قُلْتُ كَمْ بَيْنَهُمَا قَالَ أَرْبَعُونَ سَنَةً وَأَيْنَمَا أَدْرَكَتْكَ الصَّلاَةُ فَصَلِّ فَهُوَ مَسْجِدٌ وَفِي حَدِيثِ أَبِي كَامِلٍ ثُمَّ حَيْثُمَا أَدْرَكَتْكَ الصَّلاَةُ فَصَلِّهْ فَإِنَّهُ مَسْجِدٌ  

muslim:520bʿAlī b. Ḥujr al-Saʿdī > ʿAlī b. Mushir > al-Aʿmash > Ibrāhīm b. Yazīd al-Taymī

I used to read the Qur'an with my father in the vestibule (before the door of the mosque). When I recited the ayat (verses) concerning prostration, he prostrated himself. I said to him: Father, do you prostrate yourself in the path? He said: I heard Abu Dharr saying: I asked the Messenger of Allah ﷺ about the mosque that was first set up on the earth. He said: Masjid Harim. I said: Then which next? He said: The Masjid al-Aqsa. I said: How long is the space of time between the two? He said: Forty years. He (then) further said: The earth is a mosque for you, so wherever you are at the time of prayer, pray there.  

مسلم:٥٢٠bحَدَّثَنِي عَلِيُّ بْنُ حُجْرٍ السَّعْدِيُّ أَخْبَرَنَا عَلِيُّ بْنُ مُسْهِرٍ حَدَّثَنَا الأَعْمَشُ عَنْ إِبْرَاهِيمَ بْنِ يَزِيدَ التَّيْمِيِّ قَالَ

كُنْتُ أَقْرَأُ عَلَى أَبِي الْقُرْآنَ فِي السُّدَّةِ فَإِذَا قَرَأْتُ السَّجْدَةَ سَجَدَ فَقُلْتُ لَهُ يَا أَبَتِ أَتَسْجُدُ فِي الطَّرِيقِ قَالَ إِنِّي سَمِعْتُ أَبَا ذَرٍّ يَقُولُ سَأَلْتُ رَسُولَ اللَّهِ ﷺ عَنْ أَوَّلِ مَسْجِدٍ وُضِعَ فِي الأَرْضِ قَالَ الْمَسْجِدُ الْحَرَامُ قُلْتُ ثُمَّ أَىٌّ قَالَ الْمَسْجِدُ الأَقْصَى قُلْتُ كَمْ بَيْنَهُمَا قَالَ أَرْبَعُونَ عَامًا ثُمَّ الأَرْضُ لَكَ مَسْجِدٌ فَحَيْثُمَا أَدْرَكَتْكَ الصَّلاَةُ فَصَلِّ  

nasai:690ʿAlī b. Ḥujr > ʿAlī b. Mushir > al-Aʿmash > Ibrāhīm

"I used to recite Qur'an to my father on the road, and if I recited a verse in which prostration was required, he would prostrate. I said: 'O my father, do you prostrate on the street?' He said: 'I heard Abu Dharr say: "I asked the Messenger of Allah ﷺ: 'Which Masjid was built first?' He said: 'Al-Masjid Al-Haram.' [1] I said: 'Then which?' He said: 'Al-Masjid Al-Aqsa.' [2] I said: 'How long was there between them?' He said: 'Forty years. And the earth is a Masjid (or a place of prostration) for you, so wherever you are when the time for prayer comes, pray.'" [1] In Makkah. [2] "Furthest Masjid", meaning the Masjid in Jerulsalem.  

النسائي:٦٩٠أَخْبَرَنَا عَلِيُّ بْنُ حُجْرٍ قَالَ حَدَّثَنَا عَلِيُّ بْنُ مُسْهِرٍ عَنِ الأَعْمَشِ عَنْ إِبْرَاهِيمَ قَالَ

كُنْتُ أَقْرَأُ عَلَى أَبِي الْقُرْآنَ فِي السِّكَّةِ فَإِذَا قَرَأْتُ السَّجْدَةَ سَجَدَ فَقُلْتُ يَا أَبَتِ أَتَسْجُدُ فِي الطَّرِيقِ فَقَالَ إِنِّي سَمِعْتُ أَبَا ذَرٍّ يَقُولُ سَأَلْتُ رَسُولَ اللَّهِ ﷺ أَىُّ مَسْجِدٍ وُضِعَ أَوَّلاً قَالَ الْمَسْجِدُ الْحَرَامُ قُلْتُ ثُمَّ أَىُّ قَالَ الْمَسْجِدُ الأَقْصَى قُلْتُ وَكَمْ بَيْنَهُمَا قَالَ أَرْبَعُونَ عَامًا وَالأَرْضُ لَكَ مَسْجِدٌ فَحَيْثُمَا أَدْرَكْتَ الصَّلاَةَ فَصَلِّ  

nasai-kubra:771ʿAlī b. Ḥujr > ʿAlī b. Mushir > al-Aʿmash > Ibrāhīm

I used to read the Qur'an with my father in the vestibule (before the door of the mosque). When I recited the ayat (verses) concerning prostration, he prostrated himself. I said to him: Father, do you prostrate yourself in the path? He said: I heard Abu Dharr saying: I asked the Messenger of Allah ﷺ about the mosque that was first set up on the earth. He said: Masjid Harim. I said: Then which next? He said: The Masjid al-Aqsa. I said: How long is the space of time between the two? He said: Forty years. He (then) further said: The earth is a mosque for you, so wherever you are at the time of prayer, pray there. (Using translation from Muslim 520b)  

الكبرى للنسائي:٧٧١أَخْبَرَنَا عَلِيُّ بْنُ حُجْرٍ قَالَ أَخْبَرَنَا عَلِيُّ بْنُ مُسْهِرٍ عَنِ الْأَعْمَشِ عَنْ إِبْرَاهِيمَ قَالَ

كُنْتُ أَقْرَأُ عَلَى أَبِي الْقُرْآنَ فِي السِّكَّةِ فَإِذَا قَرَأْتُ السَّجْدَةَ سَجَدَ فَقُلْتُ يَا أَبَتِ أَتَسْجُدُ فِي الطَّرِيقِ؟ فَقَالَ إِنِّي سَمِعْتُ أَبَا ذَرٍّ يَقُولُ سَأَلْتُ رَسُولَ اللهِ ﷺ عَنْ أَوَّلِ مَسْجِدٍ وُضِعَ فِي الْأَرْضِ قَالَ «الْمَسْجِدُ الْحَرَامُ» فَقُلْتُ ثُمَّ أَيُّ؟ قَالَ «الْمَسْجِدُ الْأَقْصَى» قُلْتُ وَكَمْ بَيْنَهُمَا؟ قَالَ «أَرْبَعُونَ عَامًا وَالْأَرْضُ لَكَ مَسْجِدٌ فَحَيْثُمَا أَدْرَكَتْكَ الصَّلَاةُ فَصَلِّ»