Sahih al-Bukhari Book 46, Hadith 27
The Prophet (ﷺ) said, "A man felt very thirsty while he was on the way, there he came across a well. He
went down the well, quenched his thirst and came out. Meanwhile he saw a dog panting and licking
mud because of excessive thirst. He said to himself, "This dog is suffering from thirst as I did." So, he
went down the well again and filled his shoe with water and watered it. Allah thanked him for that
deed and forgave him. The people said, "O Allah's Messenger (ﷺ)! Is there a reward for us in serving the
animals?" He replied: "Yes, there is a reward for serving any animate (living being)." (See Hadith No.
551)
The Prophet (ﷺ) said, "Beware! Avoid sitting on he roads (ways)." The people said, "There is no way out of it as these are our sitting places where we have talks." The Prophet (ﷺ) said, "If you must sit there, then observe the rights of the way." They asked, "What are the rights of the way?" He said, "They are the lowering of your gazes (on seeing what is illegal to look at), refraining from harming people, returning greetings, advocating good and forbidding evil."
Once the Prophet (ﷺ) stood at the top of one of the castles (or higher buildings) of Medina and said, "Do you see what I see? No doubt I am seeing the spots of afflictions amongst your houses as numerous as the spots where raindrops fall (during a heavy rain). (See Hadith No. 102)