Sunan Abi Dawud, Book 42, Hadith 163 (Abu Dawud 4760)

Narrated AbuDharr:

The Prophet (ﷺ) said: He who separates from the community within a span takes off the noose of Islam from his neck.