Abu Hurairah reported,

The Prophet ﷺ said, "While a man was traveling along a road, he became severely thirsty. He found a well, climbed down into it, and drank. When he came out, he saw 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 went down into the well, filled his leather sock with water, and gave the dog a drink. Allah was grateful to him for that and forgave him."They asked, "Messenger of Allah, do we have a reward for treating animals well?"He replied, "There is a reward in every living creature with a moist liver."

Bukhari 2466

Sahih

حدثنا عبد الله بن مسلمة عن مالك عن سمي مولى أبي بكر عن أبي صالح السمان

عن أبي هريرة رضي الله عنه

أن النبي ﷺ قال بينا رجل بطريق اشتد عليه العطش فوجد بئرا فنزل فيها فشرب ثم خرج فإذا كلب يلهث يأكل الثرى من العطش فقال الرجل لقد بلغ هذا الكلب من العطش مثل الذي كان بلغ مني فنزل البئر فملا خفه ماء فسقى الكلب فشكر الله له فغفر له قالوا يا رسول الله وإن لنا في البهائم لأجرا فقال في كل ذات كبد رطبة أجر

البخاري 2466صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Injustices
Chapter
Wells on roads if they do not cause harm
Numbering
Darussalam 2466
Bukhari 2466