Hadithcore
Sahih al-Bukhari, 461
sahih

Narrated Abu Huraira:

"The Prophet (ﷺ) said, "Last night a big demon (afreet) from the Jinns came to me and wanted to interrupt my prayers (or said something similar) but Allah enabled me to overpower him. I wanted to fasten him to one of the pillars of the mosque so that all of you could See him in the morning but I remembered the statement of my brother Solomon (as stated in Quran): My Lord! Forgive me and bestow on me a kingdom such as shall not belong to anybody after me (38:35)." The sub narrator Rauh said, "He (the demon) was dismissed humiliated."

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

‏ إِنَّ عِفْرِيتًا مِنَ الْجِنِّ تَفَلَّتَ عَلَىَّ الْبَارِحَةَ ـ أَوْ كَلِمَةً نَحْوَهَا ـ لِيَقْطَعَ عَلَىَّ الصَّلاَةَ، فَأَمْكَنَنِي اللَّهُ مِنْهُ، فَأَرَدْتُ أَنْ أَرْبِطَهُ إِلَى سَارِيَةٍ مِنْ سَوَارِي الْمَسْجِدِ، حَتَّى تُصْبِحُوا وَتَنْظُرُوا إِلَيْهِ كُلُّكُمْ، فَذَكَرْتُ قَوْلَ أَخِي سُلَيْمَانَ رَبِّ هَبْ لِي مُلْكًا لاَ يَنْبَغِي لأَحَدٍ مِنْ بَعْدِي ‏

‏‏.‏ قَالَ رَوْحٌ فَرَدَّهُ خَاسِئًا‏.‏

References2 variants
In-Book Reference
Book 8, Hadith 109
USC-MSA web (English) reference
Vol. 1, Book 8, Hadith 450 (deprecated numbering scheme)
Sharh · explanationclick to expand
The jinn are beings made of fire that can take different forms. They are creatures that are invisible to us, that Allah may show to whomever He wills of his creation. They are accountable like us; some of them are believers and disbelievers and sinners; some of them are good and some of them are evil. In this hadith, the Prophet (blessings and peace of Allah be upon him) tells us that an ‘ifrit of the jinn attacked him the day before; in other words, he came to him suddenly and at speed whilst he was praying, to interrupt his prayer, distract him from it, and break his focus in the prayer by causing him to become confused and lose concentration, getting between him and his qiblah, and preventing him from conversing with his Lord. But Allah (may He be glorified and exalted) gave him power over that devil, so he was able to push him away. And then the Prophet (blessings and peace of Allah be upon him) wanted to tie him to one of the pillars of the mosque, so that on the following morning the people could see him tied up in the daylight. But then the Prophet (blessings and peace of Allah be upon him) remembered what his brother Sulayman ibn Dawud (peace be upon him) had said: {My Lord, forgive me and grant me a kingdom such as will not belong to anyone after me} [Sad 38:35]. Control over the jinn was part of the dominion that Allah had granted to Sulayman (peace be upon him), so the Prophet (blessings and peace of Allah be upon him) refrained from doing that, and he let that jinni run away, defeated and humiliated, as he had failed to cause any harm to the Prophet (blessings and peace of Allah be upon him) or distract him from his prayer. This hadith does not contradict the verse, because what is meant by Sulayman’s dominion over the jinn is that he was able to subjugate them and make them serve him and obey him. This hadith indicates that one may do some actions whilst praying, for the purpose of performing the prayer well, without intending to fidget or be heedless, and that one may ward off something harmful whilst praying, even if it cannot be warded off except with violence or forceful shoving. It highlights the dignity and good attitude of the Prophet (blessings and peace of Allah be upon him), and how he showed respect to Allah’s Prophet Sulayman (peace be upon him). It indicates that it is permissible to tie up a prisoner in the mosque and leave him there..
Related hadiths3
Compare isnād across 3 related chains →