Hadithcore
Hadith #2115550

Jarir (RAA) narrated that The Messenger of Allah (ﷺ) said:

“Any Muslim who stays among the polytheists, does not belong to me.” Related by the three Imams with a sound chain of narrators. Imam Al-Bukhari considered it as Mursal (i.e. the companion is absent from the chain of narrators.

وَعَنْ جَرِيرٍ الْبَجَلِيِّ ‏- رضى الله عنه ‏- قَالَ: قَالَ رَسُولُ اَللَّهِ ‏- صلى الله عليه وسلم ‏-{

أَنَا بَرِئٌ مِنْ كُلِّ مُسْلِمٍ يُقِيمُ بَيْنَ اَلْمُشْرِكِينَ

} رَوَاهُ اَلثَّلَاثَةُ وَإِسْنَادُهُ [ صَحِيحٌ ], وَرَجَّحَ اَلْبُخَارِيُّ إِرْسَالَهُ [1]‏ .‏

References2 variants
Sunnah.com reference
Book 11, Hadith 6
Arabic/English book reference
Book 11, Hadith 1303