Hadithcore
Sahih Muslim, 562
sahih

Ibn Suhaib reported:

Anas was asked about the garlic; he stated that the Messenger of Allah (ﷺ) had said: He who eats of this plant (garlic) should not approach us and pray along with us.

وَحَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنَا إِسْمَاعِيلُ، - يَعْنِي ابْنَ عُلَيَّةَ - عَنْ عَبْدِ الْعَزِيزِ، - وَهُوَ ابْنُ صُهَيْبٍ - قَالَ سُئِلَ أَنَسٌ عَنِ الثُّومِ، فَقَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏

‏ مَنْ أَكَلَ مِنْ هَذِهِ الشَّجَرَةِ فَلاَ يَقْرَبَنَّا وَلاَ يُصَلِّي مَعَنَا ‏

‏ ‏.‏

References2 variants
In-Book Reference
Book 5, Hadith 88
USC-MSA web (English) reference
Book 4, Hadith 1143 (deprecated numbering scheme)
Related hadiths6
Compare isnād across 6 related chains →