I have been commanded (to migrate) to a town (Medina) which would overpower other towns. They (the people) call it Yathrib; its correct name is (in fact) Medina. It eliminates (bad) people just as a furnace removes the alloy of iron. (Using translation from Muslim 1382a)
قَالَ رَسُولُ اللهِ ﷺ أُمِرْتُ بِقَرْيَةٍ تَأْكُلُ الْقُرَى يَقُولُونَ يَثْرِبُ وَهِيَ الْمَدِينَةُ تَنْفِي النَّاسَ كَمَا يَنْفِي الْكِيرُ خَبَثَ الْحَدِيدِ