Sunan Abi Dawud, Book 43, Hadith 62 (Abu Dawud 4836)

Abu Hurairah reported the Prophet (ﷺ) as saying:

The spirits are in marshaled hosts; those who know one another will be friendly, and those who do not, will keep apart.