Sahih Muslim , Hadith 81

It is narrated on the authority of Abu Huraira that when, the son of Adam recites the Ayat of Sajdah (prostration) and then falls down in prostration, the Satan goes into seclusion and weeps and says: Alas, and in the narration of Abu Kuraib the words are: Woe unto me, the son of Adam was commanded to prostrate, and he prostrated and Paradise was entitled to him and I was commanded to prostrate, but I refused and am doomed to Hell.

حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَأَبُو كُرَيْبٍ قَالاَ حَدَّثَنَا أَبُو مُعَاوِيَةَ، عَنِ الأَعْمَشِ، عَنْ أَبِي صَالِحٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ إِذَا قَرَأَ ابْنُ آدَمَ السَّجْدَةَ فَسَجَدَ اعْتَزَلَ الشَّيْطَانُ يَبْكِي يَقُولُ يَا وَيْلَهُ - وَفِي رِوَايَةِ أَبِي كُرَيْبٍ يَا وَيْلِي - أُمِرَ ابْنُ آدَمَ بِالسُّجُودِ فَسَجَدَ فَلَهُ الْجَنَّةُ وَأُمِرْتُ بِالسُّجُودِ فَأَبَيْتُ فَلِيَ النَّارُ ‏" ‏ ‏.‏

sunnah.com

A'mash narrated this hadith with the same chain of transmitters, with this change of words that he (the Satan) said: I disobeyed and I am doomed to Hell.

حَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنَا وَكِيعٌ، حَدَّثَنَا الأَعْمَشُ، بِهَذَا الإِسْنَادِ مِثْلَهُ غَيْرَ أَنَّهُ قَالَ ‏ "‏ فَعَصَيْتُ فَلِيَ النَّارُ ‏" ‏ ‏.‏

sunnah.com