Once a man suffered from thirst while he was walking on a journey. When he found a well, he climbed down into it and drank from it. Then he came out and saw a dog lolling its tongue from thirst and licking the ground. The man said: this dog has suffered thirst just as I have suffered from it. So he climbed down into the well, filled his shoe with water, and caught it in his mouth as he climbed up; then he gave the dog a drink. Allah appreciated this deed and so He forgave him.

It was said, “O Messenger of Allah, is there a reward for charity even for the animals?” He said:

فِي كُلِّ كَبِدٍ رَطْبَةٍ أَجْرٌ

In every living being there is a reward for charity.

Source: Sahih Muslim 2244, Grade:Sahih

Being merciful to the creation is the only way we can secure the mercy of Allah for ourselves.

Jareer ibn Abdullah reported: The Messenger of Allah, peace and blessings be upon him, said:

لَا يَرْحَمُ اللَّهُ مَنْ لَا يَرْحَمُ النَّاسَ

Allah will not be merciful to those who are not merciful to the people.

Source: Sahih Bukhari 6941, Grade:Sahih

The Prophet applied these teachings all throughout his life, even to his enemies and persecutors.

Abu Huraira reported: The Messenger of Allah, peace and blessings be upon him, was told, “O Messenger of Allah, pray against the idolaters!” So the Prophet said:

إِنِّي لَمْ أُبْعَثْ لَعَّانًا وَإِنَّمَا بُعِثْتُ رَحْمَةً

Verily, I was not sent to invoke curses, but rather I was only sent as a mercy.

Source: Sahih Muslim 2599, Grade:Sahih

Perhaps the most famous example was the forgiveness he showed his enemies after being persecuted by them for twenty-three years.

Al-Qasim ibn Salim reported: When they came to the Ka’bah they were holding onto its door and the Prophet, peace and blessings be upon him, said:

مَا تَقُولُونَ وَمَا تَظُنُّونَ

What do you say? What do you think?

They said three times, “We say you are the son of our brother.” He said: