One day Solomon gathered his army, which had different battalions of men, jinns, birds, and animals. He marched them to the country of Askalon.
While they were passing through a valley, an ant saw the approaching army and cried out to warn the other ants: "Run to your homes! Otherwise, unaware, Solomon and his army might crush you!" Solomon, hearing the cry of the ant, smiled. He was glad that the ant knew him to be a prophet who would not intentionally harm Allah's creation. He thanked Allah for saving the ants' lives.
Related Quran Ayaaths of this Hadith.
Surah 6 : Ayah 84 Surah 4 : Ayah 163 Surah 27 : Ayah 15 Surah 27 : Ayah 16 Surah 27 : Ayah 17 Surah 27 : Ayah 18 Surah 27 : Ayah 19"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari