Now, one ought to reflect that Allah Almighty did not even waste the good deed of a disbeliever, then would He let the virtuous deed of a Muslim go in vain? I am reminded of a companion who asked the Holy Prophetsa whether he would be rewarded for the substantial amounts of charity that he gave during the time that he was a disbeliever. The Holy Prophetsa responded: ‘These very alms have become the cause of your accepting Islam.’
(Hazrat Mirza Ghulam Ahmadas, Malfuzat, Vol. 1, p. 72)