I asked, "Messenger of Allah, which mosque was first established on earth?"He replied, "The Sacred Mosque."I asked, "Then which?"He replied, "The Aqsa Mosque."I asked, "How long was the period between them?"He answered, "Forty years. And wherever the time of prayer overtakes you, pray, for it is a mosque."In the version of Abu Kamil, "Then wherever the time of prayer overtakes you, pray it, for it is a mosque."
حدثني أبو كامل الجحدري حدثنا عبد الواحد حدثنا الأعمش قال ح و حدثنا أبو بكر بن أبي شيبة وأبو كريب قالا حدثنا أبو معاوية عن الأعمش عن إبراهيم التيمي عن أبيه
قلت يا رسول الله أي مسجد وضع في الأرض أول قال المسجد الحرام قلت ثم أي قال المسجد الأقصى قلت كم بينهما قال أربعون سنة وأينما أدركتك الصلاة فصل فهو مسجد وفي حديث أبي كامل ثم حيثما أدركتك الصلاة فصله فإنه مسجد