The Messenger of Allah ﷺ said, "While a man was walking, he became severely thirsty. He went down into a well and drank from it, then climbed out. There he found a dog panting and licking the moist earth out of thirst. The man said to himself, 'This dog has reached the same state of thirst that I had reached.' So he filled his leather sock with water, held it in his mouth, climbed back up, and gave the dog to drink. Allah was grateful to him for this and forgave him."The companions asked, "Messenger of Allah, do we have a reward for what we do for animals?"He replied, "There is a reward for serving any living creature."Hammad bin Salama and Rabi bin Muslim followed this narration from Muhammad bin Ziyad.
حدثنا عبد الله بن يوسف أخبرنا مالك عن سمي عن أبي صالح
أن رسول الله ﷺ قال بينا رجل يمشي فاشتد عليه العطش فنزل بئرا فشرب منها ثم خرج فإذا هو بكلب يلهث يأكل الثرى من العطش فقال لقد بلغ هذا مثل الذي بلغ بي فملأ خفه ثم أمسكه بفيه ثم رقي فسقى الكلب فشكر الله له فغفر له قالوا يا رسول الله وإن لنا في البهائم أجرا قال في كل كبد رطبة أجر تابعه حماد بن سلمة والربيع بن مسلم عن محمد بن زياد