The Messenger of Allah ﷺ said, "The earth has been made for me a place of prayer and a means of purification."
حدثنا يعقوب بن حميد بن كاسب حدثنا عبد العزيز بن أبي حازم ح و حدثنا أبو إسحق الهروي حدثنا إسمعيل بن جعفر جميعا عن العلاء عن أبيه
أن رسول الله ﷺ قال جعلت لي الأرض مسجدا وطهورا
Muslim narrated it in Sahih Muslim, Book of Mosques, Chapter on Mosques and Places of Prayer, no. 523, from the hadith of Ismail bin Jafar, in full, through this same chain.