Abu Hurairah reported,

The Messenger of Allah ﷺ said concerning Madinah, "Whoever commits an offense in it, or shelters one who commits an offense, or claims allegiance to someone other than his own guardian, upon him is the curse of Allah, of the angels, and of all people. Allah will accept from him neither ransom nor recompense."

Ahmad 9808

Sahih

وبإسناده قال قال رسول الله ﷺ المدينة من أحدث فيها حدثا أو آوى محدثا أو تولى غير مولاه فعليه لعنة الله والملائكة والناس أجمعين لا يقبل الله منه صرفا ولا عدلا

أحمد 9808صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abu Hurairah
Numbering
Darussalam 9808
Ahmad 9808