Sahih al-Bukhari, Volume 1, Book 4, Hadith 174 (USC-MSA) ⓘ
Narrated Abu Huraira: The Prophet said, "A man saw a dog eating mud from (the severity of) thirst. So, that man took a shoe (and filled it) with water and kept on pouring the water for the dog till it quenched its thirst. So Allah approved of his deed and made him to enter Paradise."
حَدَّثَنَا إِسْحَاقُ، أَخْبَرَنَا عَبْدُ الصَّمَدِ، حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ عَبْدِ اللَّهِ بْنِ دِينَارٍ، سَمِعْتُ أَبِي، عَنْ أَبِي صَالِحٍ، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم " أَنَّ رَجُلاً رَأَى كَلْبًا يَأْكُلُ الثَّرَى مِنَ الْعَطَشِ، فَأَخَذَ الرَّجُلُ خُفَّهُ فَجَعَلَ يَغْرِفُ لَهُ بِهِ حَتَّى أَرْوَاهُ، فَشَكَرَ اللَّهُ لَهُ فَأَدْخَلَهُ الْجَنَّةَ " .
also referenced under: Book 4, Hadith 39 (In-Book) & Hadith 173 (DarusSalam)
And narrated Hamza bin 'Abdullah: My father said. "During the lifetime of Allah's Apostle, the dogs used to urinate, and pass through the mosques (come and go), nevertheless they never used to sprinkle water on it (urine of the dog.)"
وَقَالَ أَحْمَدُ بْنُ شَبِيبٍ حَدَّثَنَا أَبِي، عَنْ يُونُسَ، عَنِ ابْنِ شِهَابٍ، قَالَ حَدَّثَنِي حَمْزَةُ بْنُ عَبْدِ اللَّهِ، عَنْ أَبِيهِ، قَالَ كَانَتِ الْكِلاَبُ تَبُولُ وَتُقْبِلُ وَتُدْبِرُ فِي الْمَسْجِدِ فِي زَمَانِ رَسُولِ اللَّهِ صلى الله عليه وسلم فَلَمْ يَكُونُوا يَرُشُّونَ شَيْئًا مِنْ ذَلِكَ.
also referenced under: Book 4, Hadith 40 (In-Book) & Hadith 174 (DarusSalam)