(a) Sayyiduna Abu al-Darda' (may Allah be pleased with him) narrates: The Messenger of Allah (peace and blessings be upon him) was praying, and we heard him (peace and blessings be upon him) say three times: 'A'udhu billahi minka' (I seek refuge in Allah from you). Then he said: "I curse you with the curse of Allah," saying these words three times too, and he stretched out his hands as though he were taking hold of something. When he (peace and blessings be upon him) finished the prayer, we said: O Messenger of Allah! In the prayer we heard you (peace and blessings be upon him) say some words that you did not use to say before, and we saw you stretch out your hands in the prayer? He (peace and blessings be upon him) said: "The enemy of Allah, Iblis, may Allah's curse be upon him, came with a flame of fire to throw it in front of my face, so I said three times: 'A'udhu billahi minka' (I seek refuge in Allah from you). Then I said: 'I curse you with the curse of Allah.' Still he did not move back, so I intended to seize him. Had it not been for the supplication of our brother Sulayman (peace be upon him), I would have seized him and tied him up so that the children of the people of Madinah could play with him."
(b) A hadith with a similar meaning from Sayyiduna Abu Hurayrah (may Allah be pleased with him) has already passed in the issue of making up missed prayers.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3426