Sahih Bukhari | Volume 3 | Hadith Number 94

Narrated by 'Ali
We have nothing except the Book of Allah and this written paper from the Prophet (where-in is written:) Medina is a sanctuary from the 'Air Mountain to such and such a place, and whoever innovates in it an heresy or commits a sin, or gives shelter to such an innovator in it will incur the curse of Allah, the angels, and all the people, none of his compulsory or optional good deeds of worship will be accepted. And the asylum (of protection) granted by any Muslim is to be secured (respected) by all the other Muslims; and whoever betrays a Muslim in this respect incurs the curse of Allah, the angels, and all the people, and none of his compulsory or optional good deeds of worship will be accepted, and whoever (freed slave) befriends (take as masters) other than his manumitters without their permission incurs the curse of Allah, the angels, and all the people, and none of his compulsory or optional good deeds of worship will be accepted.