Sahih Muslim , Book 4, Hadith 1161 (USC-MSA) ⓘ
Abu Huraira reported: The Messenger of Allah said: When there is a call to prayer the devil runs back breaking the wind so that he may not hear the call, and when the call is complete he comes back. And when the takbir is pronounced he again runs back, and when takbir is over he comes back and distracts a man saying: Remember such and such, remember such and such, referring to something the man did not have in his mind. with the result that he does not know how much he has prayed; so when any one of you is not sure how much he has prayed. he should perform two prostrations while sitting (qa'da).
حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا مُعَاذُ بْنُ هِشَامٍ، حَدَّثَنِي أَبِي، عَنْ يَحْيَى بْنِ أَبِي كَثِيرٍ، حَدَّثَنَا أَبُو سَلَمَةَ بْنُ عَبْدِ الرَّحْمَنِ، أَنَّ أَبَا هُرَيْرَةَ، حَدَّثَهُمْ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " إِذَا نُودِيَ بِالأَذَانِ أَدْبَرَ الشَّيْطَانُ لَهُ ضُرَاطٌ حَتَّى لاَ يَسْمَعَ الأَذَانَ فَإِذَا قُضِيَ الأَذَانُ أَقْبَلَ فَإِذَا ثُوِّبَ بِهَا أَدْبَرَ فَإِذَا قُضِيَ التَّثْوِيبُ أَقْبَلَ يَخْطُرُ بَيْنَ الْمَرْءِ وَنَفْسِهِ يَقُولُ اذْكُرْ كَذَا اذْكُرْ كَذَا . لِمَا لَمْ يَكُنْ يَذْكُرُ حَتَّى يَظَلَّ الرَّجُلُ إِنْ يَدْرِي كَمْ صَلَّى فَإِذَا لَمْ يَدْرِ أَحَدُكُمْ كَمْ صَلَّى فَلْيَسْجُدْ سَجْدَتَيْنِ وَهُوَ جَالِسٌ " .
also referenced under: Book 5, Hadith 105 (In-Book) & Hadith 389 (Reference)