Supplications to be made at Various Times - Section 1 Mishkat al-Masabih 2419
Arabic hadith text
وَعَنْ أَبِي هُرَيْرَةَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِذَا سَمِعْتُمْ صِيَاحَ الدِّيَكَةِ فَسَلُوا اللَّهَ مِنْ فَضْلِهِ فَإِنَّهَا رَأَتْ مَلَكًا وَإِذَا سَمِعْتُمْ نَهِيقَ الْحِمَارِ فَتَعَوَّذُوا بِاللَّهِ مِنَ الشَّيْطَانِ الرَّجِيمِ فَإِنَّهُ رَأَى شَيْطَانا»
Translation
Abu Huraira reported God's messenger as saying, “When you hear the cocks crowing ask God for some of His grace, for they have seen an angel; but when you hear an ass braying seek refuge in God from the devil, for it has seen a devil.” (Bukhari and Muslim.)