Narrated Anas bin Malik:The Prophet (ﷺ) said, "Ad-Dajjal will come and encamp at a place close to Medina and then Medina will shake thrice whereupon every Kafir (disbeliever) and hypocrite will go out (of Medina) towards him."
حَدَّثَنَا سَعْدُ بْنُ حَفْصٍ، حَدَّثَنَا شَيْبَانُ، عَنْ يَحْيَى، عَنْ إِسْحَاقَ بْنِ عَبْدِ اللَّهِ بْنِ أَبِي طَلْحَةَ، عَنْ أَنَسِ بْنِ مَالِكٍ، قَالَ قَالَ النَّبِيُّ صلى الله عليه وسلم " يَجِيءُ الدَّجَّالُ حَتَّى يَنْزِلَ فِي نَاحِيَةِ الْمَدِينَةِ، ثُمَّ تَرْجُفُ الْمَدِينَةُ ثَلاَثَ رَجَفَاتٍ، فَيَخْرُجُ إِلَيْهِ كُلُّ كَافِرٍ وَمُنَافِقٍ ".
Bukhari
Afflictions and the End of the World • Hadith 71