Abu Huraira (may Allah be pleased with him) narrates from the Noble Prophet (peace and blessings be upon him) that he said: A man said, "Tonight I will give some charity." He took his charity and went out (he intended to conceal the charity, so he went out at night) and gave it into the hand of an adulterous woman. In the morning, people began to talk that last night someone gave charity to an adulterous woman. He said, "O Allah! All praise is for You, my charity ended up with an adulteress." Then he said, "Today I will give charity again." He went out and gave it to a wealthy person. In the morning, people began to talk that today someone gave charity to a rich man. He said, "O Allah! All praise is for You, my charity ended up with a wealthy person." On the third day, he said again, "I will give charity." He went out and gave charity into the hand of a thief. In the morning, people began to talk that today someone gave charity to a thief. He said, "O Allah! All praise is for You, my charity ended up with an adulterous woman, a wealthy person, and a thief." Then a person came to him (meaning an angel or the prophet of that time) and said to him, "All your charities have been accepted. The adulteress, so that perhaps she may refrain from adultery (because she committed adultery for her livelihood); as for the wealthy person, it was accepted so that perhaps he may feel ashamed and take a lesson that others give charity, so he too should give, and spend from the wealth Allah has given him; and the thief, so that perhaps he may refrain from stealing (because today his need was fulfilled)."