It is related that once, somebody presented 300 gold coins to the Holy Prophet, who made a present of them to Ali. On the way home, Ali saw a harlot to whom he gave one hundred coins. The next day the whole town was gossiping about Ali's misplaced charity for giving the money to a woman of ill repute. Ali felt offended and decided that he would give another hundred coins to a worthier person this time he met a thief and he gave him one hundred coins. The people were critical of Ali squandering the money by giving it to a brigand. Ali decided that whatever money was left with him he would give it to a deserving person. This time he gave the money to a person who happened to be rich man. The people became loud in the criticism of Ali in his charity to undeserving persons. It was, however, revealed to the Holy Prophet that God had accepted the charity of Ali. The harlot after getting the money gave up her profession and decided to lead a chaste life. The thief after getting the money gave up robbery, the rich man on getting the alms felt so repentant that he distributed all his wealth among the poor.