Abu Darda reported,

The Messenger of Allah ﷺ stood to pray, and we heard him say, "I seek refuge in Allah from you." Then he said three times, "I curse you with the curse of Allah," and he stretched out his hand as if reaching for something.When he finished the prayer, we said, "Messenger of Allah, we heard you say something in the prayer that we have never heard you say before, and we saw you stretch out your hand."He said, "The enemy of Allah, Iblis, came with a flame of fire to thrust into my face, so I said three times, 'I seek refuge in Allah from you.' Then I said, 'I curse you with the curse of Allah,' but he did not draw back. Three times I said it. Then I wanted to seize him. By Allah, were it not for the supplication of our brother Sulayman, he would have been bound by it this morning, with the children of Madinah playing with him."

Nasai 1216

Sahih

أخبرنا محمد بن سلمة عن ابن وهب عن معاوية بن صالح قال حدثني ربيعة بن يزيد عن أبي إدريس الخولاني

عن أبي الدرداء قال

قام رسول الله ﷺ يصلي فسمعناه يقول أعوذ بالله منك ثم قال ألعنك بلعنة الله ثلاثا وبسط يده كأنه يتناول شيئا فلما فرغ من الصلاة قلنا يا رسول الله قد سمعناك تقول في الصلاة شيئا لم نسمعك تقوله قبل ذلك ورأيناك بسطت يدك قال إن عدو الله إبليس جاء بشهاب من نار ليجعله في وجهي فقلت أعوذ بالله منك ثلاث مرات ثم قلت ألعنك بلعنة الله فلم يستأخر ثلاث مرات ثم أردت أن آخذه والله لولا دعوة أخينا سليمان لأصبح موثقا بها يلعب به ولدان أهل المدينة

النسائي 1216صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Forgetfulness
Chapter
Cursing Iblis and seeking refuge with Allah from him during prayer
Numbering
Darussalam 1216
Nasai 1216