It is reported that ʿAbdullāh b. Masʿūd – Allāh be pleased with him – said:

If the people were gathered on one plain, all of them believers, except for two unbelievers amongst them, they would join each other. And if the people were gathered on one plain, all of them unbelievers, except for two believers amongst them, they would join each other.

Ibn Baṭṭah, Al-ʾIbānah Al-Kubrā 1:455

It is also reported that he said:

The souls of people are allied together (like for like), they meet and detect one another like horses do; those that recognise each other come together, and those that disapprove each other, separate. If a believer entered a mosque in which there were a hundred people, amongst them only one other believer, he would end up sitting with him. And if a munāfiq entered a mosque in which there were a hundred people, amongst them only one other munāfiq, he would end up sitting with him.

ibid.

It is reported that Al-Fuḍayl b. ʿAyyād – Allāh have mercy on him – said:

The souls of people are allied together, those that recognise each other come together, and those that disapprove each other, separate; and [thus] it is not possible for a follower of the Sunnah to compromise with an adherent of Bidʿah ever, except out of nifāq (hypocrisy).

Op. cit. 456