"إن الشيطان عرض لي فشد علي ليقطع الصلاة علي فأمكنني الله تعالى منه فذعته ولقد هممت أن أوثقه إلى سارية حتى تصبحوا فتنظروا إليه فذكرت قول سليمان {رَبِ هَبْ لِي مُلْكاً لَا يَنْبَغِي لِأَحَدٍ مِنْ بَعْدِي} فرده الله خاسئا
The Prophet (peace and blessings be upon him) said:
"Indeed, Satan appeared before me and pressed hard against me in order to break my prayer, but Allah Almighty gave me power over him, so I choked him. And I had intended to tie him to one of the pillars of the mosque so that you could see him in the morning, but I remembered this saying of Sulayman (peace be upon him): 'My Lord! Grant me a kingdom such as will not befit anyone after me.' [Surah Sad: 35] So Allah sent him back humiliated and disgraced."
Hadith Referenceصحیح الجامع الصغیر / حرف الألف / 1649