Abu Hurairah reported,

The Prophet ﷺ said, "An ifrit from the jinn sprang upon me last night to disrupt my prayer, but Allah gave me power over him. So I seized him and intended to tie him to one of the pillars of the mosque so that you could all look at him in the morning. Then I remembered the supplication of my brother Sulayman, 'My Lord, grant me a kingdom such as will not belong to anyone after me' [Sad 38:35], so I sent him back humiliated."

Ahmad 7969

Sahih

حدثنا محمد بن جعفر حدثنا شعبة عن محمد بن زياد

عن أبي هريرة

عن النبي ﷺ قال إن عفريتا من الجن تفلت علي البارحة ليقطع علي الصلاة فأمكنني الله منه فدعته وأردت أن أربطه إلى جنب سارية من سواري المسجد حتى تصبحوا فتنظروا إليه كلكم أجمعون قال فذكرت دعوة أخي سليمان رب {هب لي ملكا لا ينبغي لأحد من بعدي} قال فرده خاسئا

أحمد 7969صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abu Hurairah
Numbering
Darussalam 7969
Ahmad 7969