Being evasive by responding to the question ‘Who did this good thing?’ by saying, ‘An anonymous doer of good did this.’

Question
What is the ruling of a person who has done something virtuous and people ask him, ‘Who did this?’ to which he replies, “A doer of good!’ while the truth of the matter is that he is the one who did it, but he did not declare himself. What is the ruling for this type of lying?
Answer

He has not lied. This is because he has not said anything contrary to the truth. Rather, it is in line with the truth because he really is a doer of good. He did do a good thing. As long as he did do a good thing, it is the truth. If he concealed his identity as the person who did it seeking to be sincere for the sake of Allaah, he will be rewarded. There is no doubt that concealing this action was in order to preserve his sincerity. There is no doubt that what appears from his action is that he does not want his actions to be known in order that his reward does not decrease. He will be rewarded in all circumstances.