Volume 9 · Book 88 · Hadith 239
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."
— Sahih Bukhari, Volume 9, Book 88: Afflictions and the End of the World, Hadith #239