The Messenger of Allah ﷺ said, "Islam will retreat to Medina just as a snake retreats to its hole."
حدثنا يحيى بن سعيد الأموي قال حدثنا عبيد الله عن خبيب بن عبد الرحمن عن حفص بن عاصم
أن رسول الله ﷺ قال إن الإسلام ليأرز إلى المدينة كما تأرز الحية إلى جحرها
Its isnad is sahih. Bukhari related it, 3/27, in the book of Umrah, chapter on faith withdrawing to Madinah, and Muslim, 1/131, no. 147, in the book of faith, chapter explaining that Islam began as something strange, and Ibn Majah, 2/1038, no. 3111.