Only for Allah
There was a pious man among the Banu Israel who was always occupied with the worship of Allah. A group of people came to him and told him that a tribe living nearby worshipped a tree. The news upset him, so with an axe on his shoulder he went to cut down the tree.

On the way, Satan met him in the form of an old man and asked him where he was going. He said he was going to cut a certain tree. Satan said, «You should not be concerned with this tree, you had better stick to your worship and do not give it up for the sake of something that does not concern you.» «This is also worship,» retorted the pious man.
Then Satan tried to prevent him from cutting the tree: there followed a fight between the two, in which the worshipper overpowered Satan. Finding himself completely helpless, Satan begged to be excused, and when the worshipper released him, he again said, «Allah has not made the cutting of this tree obligatory on you. You do not lose anything if you do not cut it. If its cutting were necessary, Allah could have got this done through one of His many Prophets.» The worshipper insisted on cutting down the tree. There was again a fight between the two and again the worshipper overpowered Satan. «Well listen,» said Satan, «I propose a settlement that will be to your advantage.»
The worshipper agreed to hear it and Satan said, «You are a poor man, a mere burden on this earth. If you refrain from this act, I will pay you three gold coins every day. You will find them lying under your pillow every day. With this money you can fulfill your own needs, can help your relatives, help the needy and do many other virtuous things. Cutting the tree will only be a single virtue, which will ultimately be of no use because the people will grow another tree.»
This proposal appealed to the worshipper and he accepted it. He found the money under his pillow two days in a row, but on the third day there was nothing. He was enraged, picked up his axe and went again to cut down the tree. Satan in the form of an old man again met him on the way and asked him where he was going. «To cut the tree,» shouted the worshipper. «I will not let you do it,» said Satan.
A fight again took place between the two but this time Satan had the upper hand and overpowered the worshipper. The latter was surprised at his own defeat and asked the former the cause of his success. Satan replied, «At first, your anger was purely to earn the pleasure of Allah, and therefore Almighty Allah helped you to overpower me, but now it has been partly for the sake of the gold coins and therefore you have lost.»
FROM THE BOOK “THE REVIVAL OF THE
RELIGIOUS SCIENCES”
BY IMAM GHAZALI y