Hadith 244

Sahih Bukhari

Book 10: Call to Prayers (Adhaan)

Chapter 160

What has been said about uncooked garlic, onion and leek.

باب مَا جَاءَ فِي الثُّومِ النَّىِّ وَالْبَصَلِ وَالْكُرَّاثِ

And the statement of the Prophet ﷺ "Whoever has eaten garlic or onion because of hunger or otherwise should not come near our mosque." ​​
وَقَوْلِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَنْ أَكَلَ الثُّومَ أَوِ الْبَصَلَ مِنَ الْجُوعِ أَوْ غَيْرِهِ فَلاَ يَقْرَبَنَّ مَسْجِدَنَا».
Sahih al-Bukhari 853
حَدَّثَنَا مُسَدَّدٌ، قَالَ حَدَّثَنَا يَحْيَى، عَنْ عُبَيْدِ اللَّهِ، قَالَ حَدَّثَنِي نَافِعٌ، عَنِ ابْنِ عُمَرَ ـ رضى الله عنهما ـ أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ فِي غَزْوَةِ خَيْبَرَ ‏ ‏‏.‏
"‏ مَنْ أَكَلَ مِنْ هَذِهِ الشَّجَرَةِ ـ يَعْنِي الثُّومَ ـ فَلاَ يَقْرَبَنَّ مَسْجِدَنَا ‏"
Ibn `Umar:

During the holy battle of Khaibar the Prophet (ﷺ) said, "Whoever ate from this plant (i.e. garlic) should not enter our mosque."